Welcome to Fractal Forums

Fractal Math, Chaos Theory & Research => Mathematics => Topic started by: arturv on March 29, 2012, 02:52:49 AM




Title: polar coord on polar plane
Post by: arturv on March 29, 2012, 02:52:49 AM
Hello people of math

I want to generate polar coordinates on polar plane. I have r2 but don’t really know how to find θ2 properly

Code:
// polar coordinates
r = sqrt( s*s + t*t );
th = atan( s, t );

a = 0.2  // r coordinate of new polar centre
b = 3.1  // theta coordinate of new polar centre

r2 = r*r-2*r*a*cos(th-b)+a*a; // calculating new r
th2 = atan( r - a, th - b ); // calculating new theta using cartesian equation

so I’m using cartesian equation to find th2 but obviously its not really correct. There is some bending in theta direction and other issues when crossing the centre etc..

Just wondering if anyone knows a proper equation

Thanks


Title: Re: polar coord on polar plane
Post by: arturv on March 29, 2012, 02:57:22 AM
actually, maybe I should ask this question in math section?


Title: Re: polar coord on polar plane
Post by: DarkBeam on March 29, 2012, 11:45:43 AM
actually, maybe I should ask this question in math section?

Maybe. :dink:


Title: Re: polar coord on polar plane
Post by: arturv on March 30, 2012, 02:01:15 AM
got it

  theta' = arctan([r sin(theta)-r0sin(theta0)]/[r cos(theta)-r0cos(theta0)])

or

  theta' = atan2(r sin(theta) - r0 sin(theta0), r cos(theta) - r0 cos(theta0))