Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2011-10-26 13:34:55

circlemaker
Member
Registered: 2011-04-03
Posts: 20

a circle algorithm that doesn't use pi

r (radius) = any number
y (cosine) = any number between 0 and radius
tangent = √((r/y)²-1) or Math.sqrt(Math.pow(1/cos,2)-1) - I prefer computer speak big_smile
x (sine) = tangent x cosine

Say you want to make a circle with a radius of 100 on a computer.  What you'd do is get every pixel on the y axis and find it's x value using the aforementioned algorithm, then draw a line to each point.

I made a function for html5 canvas that does this in quarter circles.  It's optimized to not draw outside the screen boundary, though despite my efforts the built-in arc function is still more efficient.  I suspect it takes some kind of shortcuts, though my method is certainly 'cleaner' as you can see with this comparison: http://www.perspectiveinfinity.com/images/arc-circle_root-circle_comparison.jpg

If your still interested here's the link where I talk about it in more detail: http://www.perspectiveinfinity.com/root_circle.html
And here's the actual function in case you wanted to use or analyze it: http://www.perspectiveinfinity.com/Scripts/rcf.js

Offline

#2 2011-10-27 04:05:12

benice
Member
Registered: 2010-06-10
Posts: 117
Website

Re: a circle algorithm that doesn't use pi

Hi circlemaker;

Awesome! Thank you so much for doing this work and sharing it.

Offline

#3 2012-02-06 23:49:14

ARBGenius
Banned
Registered: 2012-02-06
Posts: 22

Re: a circle algorithm that doesn't use pi

Now Try to Calculate a Sphere inside another Sphere!?

And Show the Image with the Outside Sphere Transparent So that it's Possible to See the Inner Sphere!?


ARBGenius.


Infinity...Is Between The Start!... & ... The End!

Offline

#4 2012-02-06 23:50:44

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: a circle algorithm that doesn't use pi

Hi GiB;

The software he is using may not do 3D yet.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#5 2012-02-07 03:25:07

ARBGenius
Banned
Registered: 2012-02-06
Posts: 22

Re: a circle algorithm that doesn't use pi

Who Said anything about 3D ?

You can Post an Image...That Looks like 3D But is in fact a Flat 2D Image!


ARBGenius.

Last edited by ARBGenius (2012-02-07 03:28:59)


Infinity...Is Between The Start!... & ... The End!

Offline

#6 2012-02-07 06:03:52

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: a circle algorithm that doesn't use pi

Hi GiB;

I think you did, when you said sphere. Take Geogebra for instance, just works in 2 dimensions.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#7 2012-02-07 11:34:16

ARBGenius
Banned
Registered: 2012-02-06
Posts: 22

Re: a circle algorithm that doesn't use pi

You can Post a Sphere Image...That Looks like 3D But is in fact a Flat 2D Image!


ARBGenius.


Infinity...Is Between The Start!... & ... The End!

Offline

#8 2012-02-07 11:36:42

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: a circle algorithm that doesn't use pi

then that's not a sphere,but it's orthogonal projection on a 2D plane big_smile


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#9 2012-02-07 11:40:34

ARBGenius
Banned
Registered: 2012-02-06
Posts: 22

Re: a circle algorithm that doesn't use pi

And the Image Looks like a Sphere! smile


ARBGenius.


Infinity...Is Between The Start!... & ... The End!

Offline

#10 2012-02-07 11:41:29

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: a circle algorithm that doesn't use pi

Not unless you have software that can work with x,y,z coordinates.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#11 2012-02-07 21:58:09

ARBGenius
Banned
Registered: 2012-02-06
Posts: 22

Re: a circle algorithm that doesn't use pi

Stuff the Software!...Use the Tools & Methods you have a Hand!


ARBGenius.


Infinity...Is Between The Start!... & ... The End!

Offline

#12 2012-02-07 22:06:29

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: a circle algorithm that doesn't use pi

Hi GeniusIsBack;

Okay, why don't you do it by hand and then post it.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#13 2012-02-07 23:20:18

ARBGenius
Banned
Registered: 2012-02-06
Posts: 22

Re: a circle algorithm that doesn't use pi

I Gave the Challenge! Any Takers!?...


ARBGenius.


Infinity...Is Between The Start!... & ... The End!

Offline

#14 2012-02-07 23:22:54

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: a circle algorithm that doesn't use pi

Yes you! Only you would have the courage and the genius for such a task.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#15 2012-02-07 23:28:14

ARBGenius
Banned
Registered: 2012-02-06
Posts: 22

Re: a circle algorithm that doesn't use pi

Thank you! Time Teaches... The Stubbornest!


ARBGenius.


Infinity...Is Between The Start!... & ... The End!

Offline

#16 2012-02-07 23:31:17

ARBGenius
Banned
Registered: 2012-02-06
Posts: 22

Re: a circle algorithm that doesn't use pi

Respect Takes Time! The Sheep Find Their Way!...


ARBGenius.

Last edited by ARBGenius (2012-02-07 23:32:15)


Infinity...Is Between The Start!... & ... The End!

Offline

#17 2012-02-07 23:31:57

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: a circle algorithm that doesn't use pi

Hmmmm? So we are all sheep to the mighty GeniusIs Back?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#18 2012-02-07 23:33:49

ARBGenius
Banned
Registered: 2012-02-06
Posts: 22

Re: a circle algorithm that doesn't use pi

For You to Join the Other Sheep takes Extra Time!


ARBGenius.


Infinity...Is Between The Start!... & ... The End!

Offline

#19 2012-02-07 23:37:42

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: a circle algorithm that doesn't use pi

No, I was thinking about that picture you posted, you know the filthy one after you lost that argument about Houdini...


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#20 2012-02-07 23:38:36

ARBGenius
Banned
Registered: 2012-02-06
Posts: 22

Re: a circle algorithm that doesn't use pi

Never Ever! Lost an Argument to You!!


ARBGenius.


Infinity...Is Between The Start!... & ... The End!

Offline

#21 2012-02-07 23:39:27

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: a circle algorithm that doesn't use pi

Then why did you post that picture and run away? It was just getting good...


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#22 2012-02-07 23:41:12

ARBGenius
Banned
Registered: 2012-02-06
Posts: 22

Re: a circle algorithm that doesn't use pi

You Remember Unimportant Things! SAD!!


ARBGenius.


Infinity...Is Between The Start!... & ... The End!

Offline

#23 2012-02-07 23:42:59

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: a circle algorithm that doesn't use pi

I remember that you have been barred at least13 times under different names and for posting a lewd picture at me. For anti semitic and gay comments. For rudeness to many members. For calling people idiots and bad language. For defacing the forum. For picking offensive usernames.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#24 2012-02-27 06:41:20

circlemaker
Member
Registered: 2011-04-03
Posts: 20

Re: a circle algorithm that doesn't use pi

Aww too bad the thread went off-topic.  Anyway I just stopped by to add that while people intuitively go from a circle to a sphere when thinking of 2D to 3D projections, this geometry is easier to project as a helix when going from 2D to 3D.

A sphere is a surface while a helix is still just a curve, so all that's required is to add a dimension and stretch the circle in the direction of the new dimension (in this case, z). This geometry matches that of a sine wave when viewed from a certain perspective: http://www.perspectiveinfinity.com/sinewave3d.html

Offline

#25 2012-02-27 07:16:36

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: a circle algorithm that doesn't use pi

Hi circlemaker;

My apology for what transpired in your thread. Normally I would clean it up but it had to be left for further review.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

Board footer

Powered by FluxBB