Archived

This topic is now archived and is closed to further replies.

GL Polar Cords

This topic is 5847 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Alright, i have a doosy of a problem right now In trig we recently went over polar cords, and i was like "woah! that would be a way easier way to get my program to do the stuff it needs to do" I just have one problem, i have no clue how to achieve incorperating polar cords into my 2d GL program. I was thinking of having the sun that is in the origin of the map (0,0 cart-ized) be the origin for polar cords, and also to have each ship to have a set of polar cords where it is the origin. Is this possible? are there any tutorials for this kind of thing? thanks!

Share this post


Link to post
Share on other sites
Did they teach you how to convert polar coordinates back into rectangular (actually ''cubular'' in 3D) coordinates? If not, you do it like this:

X = Magnitude*cos(Angle);
Y = Magnitude*sin(Angle);

That''s the basic form, I''m sure you can expand on it.

[Resist Windows XP''s Invasive Production Activation Technology!]

Share this post


Link to post
Share on other sites