# Equally dividing a circular area

Hi, I am working on a project where I need to divide a unit circle into roughly equal areas.
Ideally I’d have a function
`location, area = divideCircleArea(nAreas);`
where `nAreas` is the number of areas (typically about 50). `location` would be the center of each area [x,y] and `area` the relative area the point represents.

My solution (in Matlab) so far was to use a sunflower distribution to get the locations and then use the voronoin function to create the areas and get the edges, which I would pass on to polyarea to get the area, which is then normalized.

How would you solve the issue in Julia? Is there another, better approach?

This article by Masset et al., shows a simple algorithm to divide the circle that you might consider.
The method has a constraint: `nAreas = N1*n^2`, where `N1` is the number of divisions of the inner ring and `n` is the total number of rings. So, for `nAreas = 50`, you may consider `N1=2` and `n=5`.

1 Like

The sunflower thing is cool!

Emitters · OpticSim.jl makes use of hexapolar ray fields. Maybe you can find something useful there.