Skip to content

Full-Wave Rectified Sine.

March 25, 2006

Charles

Converting math notation into maxscript can be quite difficult, take our full-wave rectified sine equation. It contains sigma (summation) of n=1 to infinity do cos(n*omega*t)/(n^2-1). So in max this cant happen as its a for loop going from 1 to infinity adding the results! So we have to use less iterations.

Sigma is basically a for loop adding up the results, where as PI (II) is multiplication of the results. With this knowledge we first have to get our variables:

t = time

0 = omega

a = amplitude

r = 0

(r) is used for the summation of cos(n*o*t)/(n^2-1) which we get with:

for n = 1 to 30 do

 (

 r = r + (cos(n*o*t)/(n^2-1))

 )

So now we have (r) which is basically the accuracy of our equation, we could go to 1000 iterations but max would probably crash. Now all we do is multiply the front of the equation by (r):

2*a/pi-4*a/pi*r

Advertisements
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: