This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Imgoodisher's profile picture

Calculating Pi Using a Circle in a String

Started by Imgoodisher, 15 March 2013 - 08:42 AM
Imgoodisher #1
Posted 15 March 2013 - 09:42 AM
In honor of pi day (3/14) and inspired by a program here, I created this program that calculates pi using a circle in a string.

(note: the circle looks flat in-game and tall in pastebin because zeroes in CC are shorter than zeroes in NP++, which are shorter than zeroes in pastebin)

If you want, you can try different circles to prove it works. I used this to create my circles. Just remember to set the 'y' to 2 and 'z' to 1 then choose any of the circles. Use spaces for the white rectangles and '0's for the red rectangles

Code:
pastebin get k6f2C5pw pi
Dlcruz129 #2
Posted 15 March 2013 - 04:37 PM
Pretty neat, but I think I'll stick with math.pi :P/>
SuicidalSTDz #3
Posted 15 March 2013 - 04:55 PM
Looks perty snazzy ^_^/>

Happy Pi Day! and tomorrow, the Ides of March! (All heil Caesar!)

The Pi Pie:


SpoilerChudnovsky formula for the win!

Dlcruz129 #4
Posted 16 March 2013 - 03:02 PM
Looks perty snazzy ^_^/>/>

Happy Pi Day! and tomorrow, the Ides of March! (All heil Caesar!)

The Pi Pie:


SpoilerChudnovsky formula for the win!


:o/> you didn't make that did you? Also, can I have a slice? :P/>
SuicidalSTDz #5
Posted 16 March 2013 - 04:00 PM
:o/> you didn't make that did you? Also, can I have a slice? :P/>
I made a pi pie, however, this is not mine ^_^/> And of course, everyone can have a slice of the pi pie :P/>
remiX #6
Posted 17 March 2013 - 02:37 AM
Nice calculations, now make you so you enter a diameter/radius :P/>

Must watch video :P/>/>