A letter C is in the form of a sector from a unit circle from which a smaller concentric circle has been removed. The goal in each case is the have the center of gravity at the inner edge of the letter.
Case 1: Find the angle of the sector if the inner radius is .5
Case 2: Find the inner radius if the angle of the sectors is 270 degrees.
The center of gravity or centroid of a sector can be found using a formula given here:
Let the center of gravity of the outer sector be c. The cg of the inner sector will then be c/2 due to proportionality. Call the mass of the outer sector, arbitrarily, 1. The inner sector then has mass -1/4. (It is only the ratio of the masses that affects the result.)
The combined cg will then be (c - c/8)/(1 - 1/4) = (8c - c)/6 = 7 c / 6
We want this to equal .5.
The following program section iterates to solve this:
pi = ATN(1) * 4
sector1 = 1
sector2 = 5
prevI = -999
FOR i = sector1 TO sector2 STEP (sector2 - sector1) / 20
pval = v
IF prevI = i THEN sect = sector1: EXIT DO
v = 7 * cg(i) / 6
IF pval > .5 AND v < .5 THEN
sector1 = prevI
sector2 = i
ELSEIF pval = .5 THEN sect = prevI: EXIT DO
ELSEIF v = .5 THEN sect = i: EXIT DO
prevI = i
sect = sector1
IF sector1 >= sector2 THEN sect = sector1: EXIT DO
LOOP UNTIL INKEY$ = CHR$(27)
PRINT sect, sect * 180 / pi, cg(sect) * 7 / 6
where the cg function evaluates the cg of the sector of a unit circle with the central angle given as its argument:
FUNCTION cg (x)
cg = 4 * SIN(x / 2) / (3 * x)
as defined by the mathworld link given in the problem.
The result is given as:
3.110740963595926 178.2323283725054 .5000000000001371
which are: the angle in radians, the angle in degrees and the location of the combined cg. Experiment shows that this is as close as you can get to .5 given the limitations of accuracy of the value of the angle--one unit difference in the last position makes it worse.
As shown, the angle is in fact a little short of 180 degrees.
If again we make the cg of the outer sector c, then that of the inner sector will be r*c, where r is the radius of the inner sector. Again, if the mass of the outer sector is 1, then that of the inner sector will be -r^2.
The combined cg will be at (c - c*r^3) / (1 - r^2), and we want to equate this to r, the radius of the inner sector. The value of c is just cg(3*pi/2) radians, as we are given the angle.
The following program fragment solves this cubic equation iteratively using 16 iterations:
c = cg(pi * 1.5)
r = .25
FOR i = 1 TO 16
r = (c - c * r * r * r) / (1 - r * r)
The iterated values show that the result has been reached to the accuracy shown:
The inner radius is a little over 1/5 the outer radius.
I'm sure there are explicit ways of solving the cubic equation.
Posted by Charlie
on 2007-05-10 19:28:32