Eight points are placed on the surface of a sphere with a radius of 1. The shortest distance between any two points is greater than 1.2. How can the points be arranged?
Hint: They are not arranged as a cube. The cube would have an edge length of only 2/sqrt(3) = 1.1547.
I peeked at the proposed official solution. As it disagrees with my numeric solution, I revisited my 20-minutes-near-midnight program and found that I was using a conversion factor for degrees to radians of pi/190 rather than pi/180.
The revised program also automatically homes in on the solution, rather than have me manually change the iteration limits and step size.
DECLARE FUNCTION acos# (x#)
DEFDBL A-Z
DIM SHARED dr
pi = ATN(1) * 4
dr = pi / 180 'deg to radians
CLS
OPEN "8points.txt" FOR OUTPUT AS #2
fLat = 2: lLat = 88: stp = 2
DO
FOR lat = fLat TO lLat STEP stp
prevSq = distOnSq: prevTri = distOnTri
lonDiff = 90
sinLat = SIN(lat * dr): cosLat = COS(lat * dr)
distOnSq = acos(sinLat * sinLat) ' cos(lonDiff)=0
distOnSq = 2 * SIN(distOnSq * dr / 2)' convert arc degrees to chord length
lonDiff = 45
sinLat2 = -sinLat
distOnTri = acos(sinLat * sinLat2 + cosLat * cosLat * COS(lonDiff * dr))
distOnTri = 2 * SIN(distOnTri * dr / 2)' convert arc degrees to chord length
PRINT USING "##.###########"; lat; distOnSq; distOnTri
PRINT #2, USING "##.###########"; lat; distOnSq; distOnTri
IF distOnTri >= distOnSq THEN
fLat = lat - stp
stp = stp / 10
lLat = fLat + 11.1 * stp
PRINT
PRINT #2,
EXIT FOR
END IF
NEXT lat
LOOP UNTIL distOnTri = distOnSq
FUNCTION acos (x) ' works in degrees
a = ATN(SQR(1 - x * x) / x) / dr
IF a < 0 THEN a = a + 180
acos = a
END FUNCTION
N and S side of side of
latitude square triangle
2.00000000000 1.41335206168 0.76807868343
4.00000000000 1.41076860921 0.77614424141
6.00000000000 1.40646635251 0.78936101791
8.00000000000 1.40045053320 0.80741368528
10.00000000000 1.39272848064 0.82990214703
12.00000000000 1.38330960296 0.85637233325
14.00000000000 1.37220537561 0.88634496423
16.00000000000 1.35942932739 0.91933919915
18.00000000000 1.34499702393 0.95488995262
20.00000000000 1.32892604878 0.99255909410
22.00000000000 1.31123598194 1.03194155245
24.00000000000 1.29194837604 1.07266762009
26.00000000000 1.27108673006 1.11440268277
28.00000000000 1.24867646069 1.15684537485
30.00000000000 1.22474487139 1.19972489689
32.00000000000 1.19932111913 1.24279799704
30.00000000000 1.22474487139 1.19972489689
30.20000000000 1.22226914654 1.20402728742
30.40000000000 1.21977852873 1.20833136450
30.60000000000 1.21727304829 1.21263690151
30.80000000000 1.21475273577 1.21694367422
30.60000000000 1.21727304829 1.21263690151
30.62000000000 1.21702168398 1.21306752685
30.64000000000 1.21677017138 1.21349816432
30.66000000000 1.21651851051 1.21392881371
30.68000000000 1.21626670142 1.21435947478
30.70000000000 1.21601474413 1.21479014732
30.72000000000 1.21576263867 1.21522083110
30.74000000000 1.21551038508 1.21565152590
30.72000000000 1.21576263867 1.21522083110
30.72200000000 1.21573741998 1.21526390009
30.72400000000 1.21571219980 1.21530696918
30.72600000000 1.21568697815 1.21535003839
30.72800000000 1.21566175501 1.21539310771
30.73000000000 1.21563653039 1.21543617714
30.73200000000 1.21561130429 1.21547924667
30.73400000000 1.21558607671 1.21552231632
30.73600000000 1.21556084764 1.21556538607
30.73400000000 1.21558607671 1.21552231632
30.73420000000 1.21558355387 1.21552662329
30.73440000000 1.21558103101 1.21553093026
30.73460000000 1.21557850814 1.21553523723
30.73480000000 1.21557598526 1.21553954420
30.73500000000 1.21557346236 1.21554385118
30.73520000000 1.21557093945 1.21554815815
30.73540000000 1.21556841652 1.21555246513
30.73560000000 1.21556589357 1.21555677211
30.73580000000 1.21556337062 1.21556107909
30.73600000000 1.21556084764 1.21556538607
30.73580000000 1.21556337062 1.21556107909
30.73582000000 1.21556311832 1.21556150979
30.73584000000 1.21556286602 1.21556194048
30.73586000000 1.21556261373 1.21556237118
30.73588000000 1.21556236143 1.21556280188
30.73586000000 1.21556261373 1.21556237118
30.73586200000 1.21556258850 1.21556241425
30.73586400000 1.21556256327 1.21556245732
30.73586600000 1.21556253804 1.21556250039
30.73586800000 1.21556251281 1.21556254346
30.73586600000 1.21556253804 1.21556250039
30.73586620000 1.21556253551 1.21556250470
30.73586640000 1.21556253299 1.21556250901
30.73586660000 1.21556253047 1.21556251331
30.73586680000 1.21556252795 1.21556251762
30.73586700000 1.21556252542 1.21556252193
30.73586720000 1.21556252290 1.21556252623
30.73586700000 1.21556252542 1.21556252193
30.73586702000 1.21556252517 1.21556252236
30.73586704000 1.21556252492 1.21556252279
30.73586706000 1.21556252467 1.21556252322
30.73586708000 1.21556252441 1.21556252365
30.73586710000 1.21556252416 1.21556252408
30.73586712000 1.21556252391 1.21556252451
30.73586710000 1.21556252416 1.21556252408
30.73586710200 1.21556252414 1.21556252412
30.73586710400 1.21556252411 1.21556252417
30.73586710200 1.21556252414 1.21556252412
30.73586710220 1.21556252413 1.21556252413
30.73586710240 1.21556252413 1.21556252413
30.73586710220 1.21556252413 1.21556252413
30.73586710222 1.21556252413 1.21556252413
30.73586710224 1.21556252413 1.21556252413
30.73586710226 1.21556252413 1.21556252413
30.73586710228 1.21556252413 1.21556252413
30.73586710230 1.21556252413 1.21556252413
30.73586710232 1.21556252413 1.21556252413
30.73586710234 1.21556252413 1.21556252413
30.73586710236 1.21556252413 1.21556252413
30.73586710238 1.21556252413 1.21556252413
30.73586710236 1.21556252413 1.21556252413
30.73586710236 1.21556252413 1.21556252413
30.73586710236 1.21556252413 1.21556252413
30.73586710236 1.21556252413 1.21556252413
30.73586710236 1.21556252413 1.21556252413
30.73586710236 1.21556252413 1.21556252413
30.73586710236 1.21556252413 1.21556252413
30.73586710236 1.21556252413 1.21556252413
30.73586710236 1.21556252413 1.21556252413
30.73586710236 1.21556252413 1.21556252413
So the final latitudes are +/- 30.73586710236 degrees and the side length is 1.21556252413.
|
Posted by Charlie
on 2008-02-03 12:50:46 |