Advanced Math/Circle divided into horizontal segments.
My question is how would I divide a circle with radius R into N horizontal segments? The segments should ideally have the same height.
I'm looking at a problem where a force is applied on a disc and the usual approach is to divide the circle into independent annuli where local forces are applied in rings and the total force is the integral across the radius at any azimuthal angle. The force in any one segment is thus only a function of the distance from the origin.
In this new problem the forces are applied in bars across the disc so the total force across any radial integral will vary with azimuth angle. The force in any one segment is thus a function of the distance from the origin and azimuth angle.
I hope my description isn't too confusing! Any help in form of formula, ref to a known algorithm (if it exists) or some code on almost any programming language would be great.
To divide the circle into n horizontal segments, you need to draw n-1 horizontal chords.
I'm assuming you want to calculate the endpoints of these chords, expressed in terms of θ.
Since r is the radius and n the number of horizontal segments, the height of each segment is 2r/n.
Parametric equations for the circle:
x = r·cosθ
y = r·sinθ
Consider chord number c (the topmost chord is 1).
The chord is c(2r/n) units below the top of the circle, so the y-coordinates of the endpoints are r-c(2r/n).
r·sinθ = r-c(2r/n)
sinθ = 1-(2c/n)
θ = arcsin(1-(2c/n))
The endpoints of the line segment:
I'm attaching a picture of a circle with radius = 7, divided into 5 segments.