Jump to content
  • Advertisement

Archived

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

Kanamit

Why PI?

This topic is 5459 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

Hi, I am not that new to programming but I am new to 3d programming and it has been a very long time since I did Maths at school. In a lot of sample code (Java3d) I have been looking at, people always seem to rotate using a division of PI instead of an absolute value - why is this? Also, could anyone explain some of the basics Maths I should be learning to help me with 3d Thanks

Share this post


Link to post
Share on other sites
Advertisement
ok, misuse of semantics, some of the fundamental maths in 3d

quote:
Original post by Captain Logic
There isn't any basic maths in 3D...




[edited by - Kanamit on November 6, 2003 3:50:08 AM]

Share this post


Link to post
Share on other sites
What do you mean by a "division of pi" as opposed to an "absolute value?" Do you mean something like angle *= pi / 2 instead of angle *= 1.571?

Share this post


Link to post
Share on other sites
yeah

quote:
Original post by merlin9x9
What do you mean by a "division of pi" as opposed to an "absolute value?" Do you mean something like angle *= pi / 2 instead of angle *= 1.571 ?


Share this post


Link to post
Share on other sites
It''s easy to understand, especially the value used there has some kind of meaning in math. In other word, it helps increasing the readability.

----------------------------------------------------------------------------------------------------------------------
In history, only steam engine and electromagnetics impelled human beings to make progress......

Share this post


Link to post
Share on other sites
quote:
Original post by Kanamit
yeah

quote:
Original post by merlin9x9
What do you mean by a "division of pi" as opposed to an "absolute value?" Do you mean something like angle *= pi / 2 instead of angle *= 1.571 ?





ok here a bit basic: sin, ocs, sinf, cosf etc all work with RAD values in your computer, so passing 360 (in degree) is senseless, because this will give you a false result. now you will have to convert the deg to RAD before passing them to sin etc (or simply calculate each angle in RAD and store it as this...). to convert RAD to deg(°) you will have to know that 2*Pi in RAD == 360 in deg (now it should be easy to convert between both).


T2k

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
mmmm... i like pie.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
meh likes candy :O *not*

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!