Jump to content

  • Log In with Google      Sign In   
  • Create Account

GL Polar Cords


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Prod   Members   -  Reputation: 134

Like
Likes
Like

Posted 13 December 2001 - 01:14 PM

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!

Sponsor:

#2 Null and Void   Moderators   -  Reputation: 1087

Like
Likes
Like

Posted 13 December 2001 - 02:12 PM

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!]

#3 Null and Void   Moderators   -  Reputation: 1087

Like
Likes
Like

Posted 13 December 2001 - 02:24 PM

Oh, another thing, you can kind of pull off polar coordinates with a rotation and a translation (instead of just a translation). It may not do what you expect though (you may need to have a counter rotation at the end).

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

#4 Prod   Members   -  Reputation: 134

Like
Likes
Like

Posted 13 December 2001 - 04:24 PM

hey thanks buddy!




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS