I've been member of this community for quite time, and now I need some advise.

Question is how do I devide given circle with radius R into N vertical segments with same area?

And by vertical I mean that devising lines should be parralell to the diametr line of that circle. One more thing - N is always even. Simple example is N = 2 : and we have circle divided vertically into two parts of equal area with deametr line.

I need this to speedup my litlle research on mathematical statistics with parallel GPU eval.

Any help In form of formula, or ref to the known algorithm (if it does exists) or some code on almost any programming language would be g8.

**UPD**

Illustration added. Case: R=1 N=6, areas of all segments are equal.

I need to know OX points marked with question marks.

pstscrptMay 11 2011, 14:30:38 UTC 4 years ago

x^2 + y^2 = radius, so the function for the arc would bey=abs(sqrt(r-x^2)).From there, the right answer from a math perspective would be to do the calculus to figure out the area of each section, and then algebra to see what value makes them even. Since I took Calc 2 sixteen years ago, I can't begin to do that anymore.

If this is for computer graphics, you're likely dealing with pixels, and you can just count a single pixel as one square unit and increase X by one pixel at a time until you pass the right fraction of the area.

lucky__manMay 11 2011, 14:44:08 UTC 4 years ago

In order to find Yi you should solve equation 0.5*(x-sin(x))=a for some known a. It could be done by any convergence method: Newton, bisections, etc. "x" is the angle, Yi = cos(x) or something like this.

http://en.wikipedia.org/wiki/Arc_(geome

da_foreverMay 11 2011, 18:28:21 UTC 4 years ago

BTW www.gil-algorithms.com are kick-ass project. Envy you -)

lucky__manMay 12 2011, 10:25:44 UTC 4 years ago

"Elegant" and "efficient" are often contradict to each other :)

Newton search is extremely fast, I think you will find Yi for N=1928474 with ease after 10-15 iterations. As far as I remember solving this problem analytically require using Elliptic integrals. They are extremely elegant but not so easy to program, and I am not sure the calculation will be faster than a primitive Newton convergence method.

http://en.wikipedia.org/wiki/Elliptic_i

da_foreverMay 11 2011, 14:53:41 UTC 4 years ago

Your solution are very close to what I've been thinking of. This is a good way, but it takes to mutch calculation to figure out what is values to, let's say 192 equal parts of circle. Shurly I have to figure out only 95 of them, but still.

In fact I'm looking for some elegant mathematical solution with minimal iterations count.

Deleted comment

da_foreverMay 11 2011, 18:03:48 UTC 4 years ago

Please see post update.

Deleted comment

## Oh, what a gr8 pls!

da_foreverJuly 9 2011, 05:02:49 UTC 3 years ago

Sand me 13 solved capthcas and we well talk about this -)

shamebearwrote inalgorithms: ←Contributing without even knowing