Page 2 of 6

 Cahill-Keyes Octant Graticule: Principles and Specifications with Perl programs and OpenOffice.org 2.0 macros for 1/1,000,000 Megamap Gene Keyes 2010-08-20

 9) Constructing the Cahill-Keyes Octant Graticule and Megamap with Perl programming and OpenOffice.org Draw macros Notes by Mary Jo Graça: I started programming a whole octant, using Gene Keyes' coordinate system, that is, with a scaffold triangle upright and tilted left in a 10,000 x 12,000 grid. But I decided that having to consider both positive and negative meridians and positive and negative angles of lines was much more complicated than necessary. So I chose to work with a different coordinate system and with only half the octant. I named this, MJ's coordinate system (MJ for Mary Jo), in an area 10,000 x 5,773.5027 (the coordinates of point N). Only the positive half of the octant is calculated. This is the "template" half octant. It is laid on its side, with point M at the origin of the set of axes, and point G on the x-axis, at point (0; 10,000):

 Fig. 6. Half-octant as used by Mary Jo. This is merely a jpeg; lines in a printed version from the original odg or pdf would not be as wavy. —GK

 (by MJ, cont.) This has several advantages: • All the angles are measured in a counterclockwise direction from the positive x-axis; this being the way I am used to thinking of angles, sines and cosines, there is less opportunity for mistakes. • All the angles for meridians are positive. This makes intersection of the meridian segments easier to calculate • To calculate the other half of the octant, one has only to use the negative of the y-coordinates • Calculation of the coordinates for the southern octant are also easy: for a given latitude-longitude, the x-coordinate is 20,000 minus the x-coordinate for the northern octant, and the y-coordinate equals that of the northern octant Given the above, all calculations for meridian joints, and meridian-parallel intersection can be done for the positive half-octant, and then easily converted for the remaining half or twin octant. When coordinates are desired for Gene's one-octant or the 8 octants of the world map this is the procedure: • For a land point, it is determined which octant it is on, based on its latitude and longitude; then, the absolute value of the latitude is taken, and the longitude is converted to the corresponding meridian on the "template half-octant" • Using these template latitude and longitude, the point's position in MJ's coordinates is calculated • If the point is on the negative side or the southern octant, its coordinates are converted to have the correct x and y coordinates • Then a formula is applied to rotate and translate from MJ's coordinate system to Gene's, based on its octant

 Notes by Gene Keyes "HalfOctant8", the first of two Perl programs by Mary Jo, outputs a complete data set of all the x-y coordinates for all one degree geocells of a horizontal half octant (including the very narrow polar geocells from 90 to 85°), plus meridian joints, octant border, etc. The data format is a text-file of tab-separated values [shown as .csv, comma-separated values], which is convertible to a spreadsheet. That complete table is presented here in HTML on page 3. Its x-y coordinates differ from my hand-calculated, whole-octant values, but the segment lengths and geocell dimensions remain the same. Then on p. 4 is Mary Jo's second Perl program, "OOmacroMaker4", to actually prepare macros which can draw the Cahill-Keyes Octant Graticule, and Megamap, in OpenOffice.org, using the output of this first Perl program.