Thread: Formulas.
View Single Post
  #5  
Old 02-09-2002, 09:45 AM
Lomgren Lomgren is offline
Senior Member, Anti-Spam
Join Date: Mar 2001
Location: Missouri
Posts: 196
Lomgren will become famous soon enough
Talking Polar Coordinates!!

[EDIT] the forum replaced my theta with a sideways E so don't yell at me[/EDIT]

*sits down with dusty old book in lap*
Heh, these are fun indeed!
:New Variables:
Ø - theta (inner angle of a circle, 360 deg. 1 radian)
a - any real number
b - any real number
n - any positive integer

:Formulas:
-Rose-
R = a*cos(n*Ø)
R = a*sin(n*Ø)

-Lemniscate-
R^2 = a^2*cos(2*Ø)
R^2 = a^2*sin(2*Ø)

-Limaçon-
R = a + b*cos(Ø)
R = a + b*sin(Ø)

-Cardioid-
R = a + a*cos(Ø)
R = a + a*si(Ø)

-Spiral of Archimedes-
R = a*Ø

-convert polar to rectangle coordinates-
x = R*cos(Ø)
y = R*sin(Ø)
-or for graal's y scale-
y = -R*sin(Ø)

and for a simple script to test these formulas;
[script]
for (i=startx;i<=lastx;i+=interval) {
<insert formula here, but use i for the non-constant variable
<(Ø for most formulas, change all others to your descretion>
showimg i*(1/interval),kstar.gif,x+g,y-h;
}
[/script]

but change the startx, lastx, and interval to what you want,
and replace the x with g, and y with h in the formulas,
except for the polar graphs, just use the conversion formulas.


__________________
Lomgren - devoted to classic, even though I may be gone for months on end
Reply With Quote