Well, this was for Pi day (3/14) and I was familiar with how Aristotle (an ancient Greek math dude) came up with values of Pi using a method similar to this and I wanted to see if I could do computer version of it. Then, I added in the ant to make it more interesting!
you would have to use a LOT of math for it and probably the most complicated part is making the arrow work like on the game (pleese just make the arrow go to where u want it to but making it go in a ark will ba a challange and if u can't i understand but could u still try to mimick the rest of the game?)
HEY!!! hi p2s i found this REALLY good game that i think is fun and wondered if you could make it into scratch (it's a flash internet game) it's a REALLY good game so could u tell me if youre at least going to try the challange!
You mean a shape other than a circle? The method could still be used to measure the distance around the outside, as long as the shape didn't bend back on itself.
Increased the speed and accuracy of the intercept finding routine. The routine now appears to approach the correct value of Pi from below, with increasing number of sides, as I would expect.
This project calculates approximate values of Pi using only the distance formula by approximating the circle with regular polygons.
This is the technique an ant with a straight ruler might use if he wanted to calculate pi. He walks out from the center in opposite directions until he finds the circle edges to get the diameter.
Then, he divides the circle up into segments. He walks along each segment until he finds the edge of the circle and measures the distance to the last point on the circle, creating a polygon. By adding up the distances along the perimeter of the polygon, he gets an approximate circumference.
Dividing that by the diameter yields an approximate value of pi. The approximation will be more accurate if the polygon has more sides.
There are a couple of substantial inaccuracies in this calculation:
1. The circle is not perfect, it is approximated by a set of pixels.
2. The probe is also not a perfect circle, it is crudely approximated by a set of pixels
But despite that, the ant can get a pretty good result with only 30 sides or so. Not too shabby!
Note that the ant could save a lot of time by measuring one side of the polygon and multiplyiing by the number of sides (since these are regular polygons) but that wouldn't be nearly as much fun to watch!
Credit again goes to Kevin Karplus for his Print Decimal routine.
Comments
You need to be logged in to post comments
Add a Comment
Very hot! =)
(view all replies)Comment Reply
How do you think of all these cool ideas?
(view all replies)Comment Reply
Well, this was for Pi day (3/14) and I was familiar with how Aristotle (an ancient Greek math dude) came up with values of Pi using a method similar to this and I wanted to see if I could do computer version of it. Then, I added in the ant to make it more interesting!
(view all replies)Comment Reply
well it also draws regualr shapes
(view all replies)Comment Reply
This is really good and helpful
(view all replies)Comment Reply
How do you make it do that!
(view all replies)Comment Reply
I like this a lot. I have uploaded my own version which uses different technique.
(view all replies)Comment Reply
This is so educational but in a good way of course!
(view all replies)Comment Reply
uhhhhhhhhhhhhhhh.Im dumb as a rat
(view all replies)Comment Reply
wow
(view all replies)Comment Reply
man how do you make your projects like this!!
(view all replies)Comment Reply
p2s i thought i saw that bug in my game that stupid backbutton thing is a bummer well i might work on it today but i wanted to make a game like froger
(view all replies)Comment Reply
HAPPY EASTER!!!
(view all replies)Comment Reply
Hi Paddle2See, I've shared the "Fractions-4" with your idea at (link to project)
(view all replies)Comment Reply
Yo dude I made a sprite animator similar to pivot. You should check it out. Note it only works offline.
(view all replies)Comment Reply
(link to project)
(view all replies)Comment Reply
Cool project! That is one talented ant. :P
(view all replies)Comment Reply
you would have to use a LOT of math for it and probably the most complicated part is making the arrow work like on the game (pleese just make the arrow go to where u want it to but making it go in a ark will ba a challange and if u can't i understand but could u still try to mimick the rest of the game?)
(view all replies)Comment Reply
oh sorry here's the URL: http://armorgames.com/play/588/bowmaster-prelude
(view all replies)Comment Reply
HEY!!! hi p2s i found this REALLY good game that i think is fun and wondered if you could make it into scratch (it's a flash internet game) it's a REALLY good game so could u tell me if youre at least going to try the challange!
(view all replies)Comment Reply
you're right, this can be very innacurate, but it is still good. if you have to little sides, it doesnt even get to 3!
(view all replies)Comment Reply
You mean a shape other than a circle? The method could still be used to measure the distance around the outside, as long as the shape didn't bend back on itself.
(view all replies)Comment Reply
what woud hapem if you used a difrent shape???
(view all replies)Comment Reply
Increased the speed and accuracy of the intercept finding routine. The routine now appears to approach the correct value of Pi from below, with increasing number of sides, as I would expect.
(view all replies)Comment Reply
cool! :)
(view all replies)Comment Reply
This is sort of a crude approximation of Archimedes technique. What more do you want - it's only an ant!
(view all replies)Comment Reply