Jump to content
  • Advertisement

Archived

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

tylerbingham

PI and OpenGL screensaver(MATH!!)

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

I am trying to make a screensaver in Opengl that keeps calculating pi(like the supercomputers do)Anyone know a function or formula I can use to do this

Share this post


Link to post
Share on other sites
Advertisement
http://www.mathcad.com/library/constants/pi.htm

there is no calculation for pi, but that site gives a few theories on how to calculate pi. You will have to write the code though, it shouldn''t be too hard. One they failed to mention (the most recent one) is one that I can''t remember too well, but it basically counts the number of unit squares inside an increasingly large circles by taking two random numbers between 0 and the radius of the square and seeing if the sum of their squares is less than the radius squared, or something.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!