home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume37 / astrolog / part07 < prev    next >
Encoding:
Text File  |  1993-05-18  |  60.4 KB  |  1,526 lines

  1. Newsgroups: comp.sources.misc
  2. From: astrolog@u.washington.edu (Astrolog)
  3. Subject: v37i076:  astrolog - Generation of astrology charts v3.05, Part07/12
  4. Message-ID: <1993May19.061909.12161@sparky.imd.sterling.com>
  5. X-Md4-Signature: 09d87774c5049b8f6237f2b36a3c9ded
  6. Date: Wed, 19 May 1993 06:19:09 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: astrolog@u.washington.edu (Astrolog)
  10. Posting-number: Volume 37, Issue 76
  11. Archive-name: astrolog/part07
  12. Environment: UNIX, DOS, VMS
  13. Supersedes: astrolog: Volume 30, Issue 62-69
  14.  
  15. #! /bin/sh
  16. # This is a shell archive.  Remove anything before this line, then unpack
  17. # it by saving it into a file and typing "sh file".  To overwrite existing
  18. # files, type "sh file -c".  You can also feed this as standard input via
  19. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  20. # will see the following message at the end:
  21. #        "End of archive 7 (of 12)."
  22. # Contents:  formulas.c Helpfile.p3
  23. # Wrapped by pul@hardy on Sun May 16 22:23:17 1993
  24. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  25. if test -f 'formulas.c' -a "${1}" != "-c" ; then 
  26.   echo shar: Will not clobber existing file \"'formulas.c'\"
  27. else
  28. echo shar: Extracting \"'formulas.c'\" \(28398 characters\)
  29. sed "s/^X//" >'formulas.c' <<'END_OF_FILE'
  30. X/*
  31. X** Astrolog (Version 3.05) File: formulas.c
  32. X**
  33. X** IMPORTANT: The planetary calculation routines used in this program
  34. X** have been Copyrighted and the core of this program is basically a
  35. X** conversion to C of the routines created by James Neely as listed in
  36. X** Michael Erlewine's 'Manual of Computer Programming for Astrologers',
  37. X** available from Matrix Software. The copyright gives us permission to
  38. X** use the routines for our own purposes but not to sell them or profit
  39. X** from them in any way.
  40. X**
  41. X** IN ADDITION: the graphics database and chart display routines used in
  42. X** this program are Copyright (C) 1991-1993 by Walter D. Pullen. Permission
  43. X** is granted to freely use and distribute these routines provided one
  44. X** doesn't sell, restrict, or profit from them in any way. Modification
  45. X** is allowed provided these notices remain with any altered or edited
  46. X** versions of the program.
  47. X*/
  48. X
  49. X#include "astrolog.h"
  50. X
  51. Xreal MC, Asc, Vtx, OB,
  52. X  A, R, B, Q, L, G, O, RA, R1, R2, AZ, FF, LO, OA,
  53. X  S, S1, S2, AP, IN, AN, XX, YY, ZZ, NU, BR, AB, C, P, T0[4];
  54. X
  55. Xreal geo[TOTAL+1], geoalt[TOTAL+1], georet[TOTAL+1],
  56. X  helio[TOTAL+1], helioalt[TOTAL+1], helioret[TOTAL+1],
  57. X  planet1[TOTAL+1], planet2[TOTAL+1], planetalt1[TOTAL+1], planetalt2[TOTAL+1],
  58. X  house1[SIGNS+1], house2[SIGNS+1], ret1[TOTAL+1], ret2[TOTAL+1];
  59. X
  60. X
  61. X/*
  62. X*******************************************************************************
  63. X** Specific calculations
  64. X*******************************************************************************
  65. X*/
  66. X
  67. X/* Given a month, day, and year, convert it into a single Julian day value, */
  68. X/* i.e. the number of days passed since a fixed reference date.             */
  69. X
  70. Xreal MdyToJulian(mon, day, yea)
  71. Xreal mon, day, yea;
  72. X{
  73. X  long im, j;
  74. X
  75. X  im = 12*((long)yea+4800)+(long)mon-3;
  76. X  j = (2*(im%12) + 7 + 365*im)/12;
  77. X  j += (long)day + im/48 - 32083;
  78. X  if (j > 2299171)                   /* Take care of dates in */
  79. X    j += im/4800 - im/1200 + 38;     /* Gregorian calendar.   */
  80. X  return (real)j;
  81. X}
  82. X
  83. X
  84. X/* Integer division - like the "/" operator but always rounds result down. */
  85. X
  86. Xlong dvd(x, y)
  87. Xlong x, y;
  88. X{
  89. X  long z;
  90. X
  91. X  if (y == 0)
  92. X    return x;
  93. X  z = x / y;
  94. X  if ((x >= 0 == y >= 0) || x-z*y == 0)
  95. X    return z;
  96. X  return z - 1;
  97. X}
  98. X
  99. X
  100. X/* Take a Julian day value, and convert it back into the corresponding */
  101. X/* month, day, and year.                                               */
  102. X
  103. Xvoid JulianToMdy(JD, mon, day, yea)
  104. Xreal JD, *mon, *day, *yea;
  105. X{
  106. X  long L, N, IT, JT, K, IK;
  107. X
  108. X  L  = (long)floor(JD+0.5)+68569L;
  109. X  N  = dvd(4L*L, 146097L);
  110. X  L  -= dvd(146097L*N + 3L, 4L);
  111. X  IT = dvd(4000L*(L+1L), 1461001L);
  112. X  L  -= dvd(1461L*IT, 4L) - 31L;
  113. X  JT = dvd(80L*L, 2447L);
  114. X  K  = L-dvd(2447L*JT, 80L);
  115. X  L  = dvd(JT, 11L);
  116. X  JT += 2L - 12L*L;
  117. X  IK = 100L*(N-49L) + IT + L;
  118. X  *mon = (real)JT; *day = (real)K; *yea = (real)IK;
  119. X}
  120. X
  121. X
  122. X/* This is a subprocedure of CastChart(). Once we have the chart parameters, */
  123. X/* calculate a few important things related to the date, i.e. the Greenwich  */
  124. X/* time, the Julian day and fractional part of the day, the offset to the    */
  125. X/* sidereal, and a couple of other things.                                   */
  126. X
  127. Xreal ProcessInput(var)
  128. Xint var;
  129. X{
  130. X  real Off, Ln;
  131. X
  132. X  F = Sgn(F)*floor(dabs(F))+FRACT(dabs(F))*100.0/60.0+DecToDeg(X);
  133. X  L5 = DecToDeg(L5);
  134. X  LA = DTOR(DecToDeg(LA));
  135. X  LA = MIN(LA, 89.9999);      /* Make sure the chart isn't being cast */
  136. X  LA = MAX(LA, -89.9999);     /* on the precise north or south pole.  */
  137. X
  138. X  /* if parameter 'var' isn't set, then we can assume that the true time   */
  139. X  /* has already been determined (as in a -rm switch time midpoint chart). */
  140. X
  141. X  if (var) {
  142. X    JD = MdyToJulian(M, D, Y);
  143. X    if (!progress || (operation & DASHp0) > 0)
  144. X      T = ((JD-2415020.0)+F/24.0-0.5)/36525.0;
  145. X    else
  146. X
  147. X      /* Determine actual time that a progressed chart is to be cast for. */
  148. X
  149. X      T = (((Jdp-JD)/progday+JD)-2415020.0+F/24.0-0.5)/36525.0;
  150. X  }
  151. X
  152. X  /* Compute angle that the ecliptic is inclined to the Celestial Equator */
  153. X  OB = DTOR(23.452294-0.0130125*T);
  154. X
  155. X  Ln = Mod((933060-6962911*T+7.5*T*T)/3600.0);    /* Mean lunar node */
  156. X  Off = (259205536.0*T+2013816.0)/3600.0;         /* Mean Sun        */
  157. X  Off = 17.23*sin(DTOR(Ln))+1.27*sin(DTOR(Off))-(5025.64+1.11*T)*T;
  158. X  Off = (Off-84038.27)/3600.0;
  159. X  SD = operation & DASHs ? Off : 0.0;
  160. X  return Off;
  161. X}
  162. X
  163. X
  164. X/* Convert polar to rectangular coordinates. */
  165. X
  166. Xvoid PolToRec(A, R, X, Y)
  167. Xreal A, R, *X, *Y;
  168. X{
  169. X  if (A == 0.0)
  170. X    A = 1.7453E-09;
  171. X  *X = R*cos(A);
  172. X  *Y = R*sin(A);
  173. X}
  174. X
  175. X
  176. X/* Convert rectangular to polar coordinates. */
  177. X
  178. Xvoid RecToPol(X, Y, A, R)
  179. Xreal X, Y, *A, *R;
  180. X{
  181. X  if (Y == 0.0)
  182. X    Y = 1.7453E-09;
  183. X  *R = sqrt(X*X+Y*Y);
  184. X  *A = atan(Y/X);
  185. X  if (*A < 0.0)
  186. X    *A += PI;
  187. X  if (Y < 0.0)
  188. X    *A += PI;
  189. X}
  190. X
  191. X
  192. X/* Convert rectangular to spherical coordinates. */
  193. X
  194. Xvoid RecToSph()
  195. X{
  196. X  A = B; R = 1.0;
  197. X  PolToRec(A, R, &X, &Y);
  198. X  Q = Y; R = X; A = L;
  199. X  PolToRec(A, R, &X, &Y);
  200. X  G = X; X = Y; Y = Q;
  201. X  RecToPol(X, Y, &A, &R);
  202. X  A += O;
  203. X  PolToRec(A, R, &X, &Y);
  204. X  Q = ASIN(Y);
  205. X  Y = X; X = G;
  206. X  RecToPol(X, Y, &A, &R);
  207. X  if (A < 0.0)
  208. X    A += 2*PI;
  209. X  G = A;
  210. X}
  211. X
  212. X
  213. X/* Do a coordinate transformation: Given a longitude and latitude value,    */
  214. X/* return the new longitude and latitude values that the same location      */
  215. X/* would have, were the equator tilted by a specified number of degrees.    */
  216. X/* In other words, do a pole shift! This is used to convert among ecliptic, */
  217. X/* equatorial, and local coordinates, each of which have zero declination   */
  218. X/* in different planes. In other words, take into account the Earth's axis. */
  219. X
  220. Xvoid CoorXform(azi, alt, tilt)
  221. Xreal *azi, *alt, tilt;
  222. X{
  223. X  real x, y, a1, l1;
  224. X
  225. X  x = cos(*alt)*sin(*azi)*cos(tilt);
  226. X  y = sin(*alt)*sin(tilt);
  227. X  x -= y;
  228. X  a1 = cos(*alt);
  229. X  y = cos(*alt)*cos(*azi);
  230. X  l1 = (y == 0.0 ? Sgn(x)*PI/2.0 : atan(x/y));
  231. X  if (l1 < 0.0)
  232. X    l1 += PI;
  233. X  if (x < 0.0)
  234. X    l1 += PI;
  235. X  a1 = a1*sin(*azi)*sin(tilt)+sin(*alt)*cos(tilt);
  236. X  a1 = ASIN(a1);
  237. X  *azi = l1; *alt = a1;
  238. X}
  239. X
  240. X
  241. X/* This is another subprocedure of CastChart(). Calculate a few variables */
  242. X/* corresponding to the chart parameters that are used later on. The      */
  243. X/* astrological vertex (object number twenty) is also calculated here.    */
  244. X
  245. Xvoid ComputeVariables()
  246. X{
  247. X  RA = DTOR(Mod((6.6460656+2400.0513*T+2.58E-5*T*T+F)*15.0-L5));
  248. X  R2 = RA; O = -OB; B = LA; A = R2; R = 1.0;
  249. X  PolToRec(A, R, &X, &Y);
  250. X  X *= cos(O);
  251. X  RecToPol(X, Y, &A, &R);
  252. X  MC = Mod(SD+RTOD(A));            /* Midheaven */
  253. X  L = R2;
  254. X  RecToSph();
  255. X  AZ = Mod(SD+Mod(G+PI/2.0));      /* Ascendant */
  256. X  L= R2+PI; B = PI/2.0-dabs(B);
  257. X  if (LA < 0.0)
  258. X    B = -B;
  259. X  RecToSph();
  260. X  Vtx = Mod(SD+RTOD(G+PI/2.0));    /* Vertex */
  261. X}
  262. X
  263. X
  264. X/*
  265. X*******************************************************************************
  266. X** House cusp calculations
  267. X*******************************************************************************
  268. X*/
  269. X
  270. X
  271. X/* This is a subprocedure of HousePlace(). Given a zodiac position, return */
  272. X/* which of the twelve houses it falls in. Remember that a special check   */
  273. X/* has to be done for the house that spans 0 degrees Aries.                */
  274. X
  275. Xint HousePlaceIn(point)
  276. Xreal point;
  277. X{
  278. X  int i = 0;
  279. X
  280. X  point = Mod(point + 0.5/60.0);
  281. X  do {
  282. X    i++;
  283. X  } while (!(i >= SIGNS ||
  284. X      (point >= house[i] && point < house[Mod12(i+1)]) ||
  285. X      (house[i] > house[Mod12(i+1)] &&
  286. X      (point >= house[i] || point < house[Mod12(i+1)]))));
  287. X  return i;
  288. X}
  289. X
  290. X
  291. X/* For each object in the chart, determine what house it belongs in. */
  292. X
  293. Xvoid HousePlace()
  294. X{
  295. X  int i;
  296. X
  297. X  for (i = 1; i <= total; i++)
  298. X    inhouse[i] = HousePlaceIn(planet[i]);
  299. X}
  300. X
  301. X
  302. X/* The following two functions calculate the midheaven and ascendant of  */
  303. X/* the chart in question, based on time and location. They are also used */
  304. X/* in some of the house cusp calculation routines as a quick way to get  */
  305. X/* the 10th and 1st house cusps.                                         */
  306. X
  307. Xreal CuspMidheaven()
  308. X{
  309. X  real MC;
  310. X
  311. X  MC = atan(tan(RA)/cos(OB));
  312. X  if (MC < 0.0)
  313. X    MC += PI;
  314. X  if (RA > PI)
  315. X    MC += PI;
  316. X  return Mod(RTOD(MC)+SD);
  317. X}
  318. X
  319. Xreal CuspAscendant()
  320. X{
  321. X  real Asc;
  322. X
  323. X  Asc = atan(cos(RA)/(-sin(RA)*cos(OB)-tan(LA)*sin(OB)));
  324. X  if (Asc < 0.0)
  325. X    Asc += PI;
  326. X  if (cos(RA) < 0.0)
  327. X    Asc += PI;
  328. X  return Mod(RTOD(Asc)+SD);
  329. X}
  330. X
  331. X
  332. X/* These are various different algorithms for calculating the house cusps: */
  333. X
  334. Xvoid CuspPlacidus()
  335. X{
  336. X  int i;
  337. X
  338. X  if (Y == 1.0)
  339. X    X = 1.0;
  340. X  else
  341. X    X = -1.0;
  342. X  for (i = 1; i <= 10; i++) {
  343. X
  344. X    /* This formula works except at 0 latitude (LA == 0.0). */
  345. X
  346. X    XX = X*sin(R1)*tan(OB)*tan(LA == 0.0 ? 0.0001 : LA);
  347. X    XX = ACOS(XX);
  348. X    if (XX < 0.0)
  349. X      XX += PI;
  350. X    if (Y == 1.0)
  351. X      R2 = RA+PI-(XX/FF);
  352. X    else
  353. X      R2 = RA+(XX/FF);
  354. X    R1 = R2;
  355. X  }
  356. X  LO = atan(tan(R1)/cos(OB));
  357. X  if (LO < 0.0)
  358. X    LO += PI;
  359. X  if (sin(R1) < 0.0)
  360. X    LO += PI;
  361. X  LO = RTOD(LO);
  362. X}
  363. X
  364. Xvoid HousePlacidus()
  365. X{
  366. X  int i;
  367. X
  368. X  Y = 0.0;
  369. X  house[4] = Mod(MC+180.0-SD);
  370. X  house[1] = Mod(Asc-SD);
  371. X  R1 = RA+DTOR(30.0);  FF=3.0; CuspPlacidus(); house[5]=Mod(LO+180.0);
  372. X  R1 = RA+DTOR(60.0);  FF=1.5; CuspPlacidus(); house[6]=Mod(LO+180.0);
  373. X  R1 = RA+DTOR(120.0); Y=1.0;  CuspPlacidus(); house[2]=LO;
  374. X  R1 = RA+DTOR(150.0); FF=3.0; CuspPlacidus(); house[3]=LO;
  375. X  for (i = 1; i <= SIGNS; i++) {
  376. X    if (i > 6)
  377. X      house[i] = Mod(house[i-6]+180.0);
  378. X    else
  379. X      house[i] = Mod(house[i]+SD);
  380. X  }
  381. X}
  382. X
  383. Xvoid HouseKoch()
  384. X{
  385. X  real A1, A2, A3, KN;
  386. X  int i;
  387. X
  388. X  A1 = sin(RA)*tan(LA)*tan(OB);
  389. X  A1 = ASIN(A1);
  390. X  for (i = 1; i <= SIGNS; i++) {
  391. X    D = Mod(60.0+30.0*(real)i);
  392. X    A2 = D/90.0-1.0; KN = 1.0;
  393. X    if (D >= 180.0) {
  394. X      KN = -1.0;
  395. X      A2 = D/90.0-3.0;
  396. X    }
  397. X    A3 = DTOR(Mod(RTOD(RA)+D+A2*RTOD(A1)));
  398. X    X = atan(sin(A3)/(cos(A3)*cos(OB)-KN*tan(LA)*sin(OB)));
  399. X    if (X < 0.0)
  400. X      X += PI;
  401. X    if (sin(A3) < 0.0)
  402. X      X += PI;
  403. X    house[i] = Mod(RTOD(X)+SD);
  404. X  }
  405. X}
  406. X
  407. Xvoid HouseEqual()
  408. X{
  409. X  int i;
  410. X
  411. X  for (i = 1; i <= SIGNS; i++) {
  412. X    house[i] = Mod(Asc-30.0+30.0*(real)i);
  413. X  }
  414. X}
  415. X
  416. Xvoid HouseCampanus()
  417. X{
  418. X  real KO, DN;
  419. X  int i;
  420. X
  421. X  for (i = 1; i <= SIGNS; i++) {
  422. X    KO = DTOR(60.000001+30.0*(real)i);
  423. X    DN = atan(tan(KO)*cos(LA));
  424. X    if (DN < 0.0)
  425. X      DN += PI;
  426. X    if (sin(KO) < 0.0)
  427. X      DN += PI;
  428. X    Y = sin(RA+DN);
  429. X    X = cos(RA+DN)*cos(OB)-sin(DN)*tan(LA)*sin(OB);
  430. X    X = atan(Y/X);
  431. X    if (X < 0.0)
  432. X      X += PI;
  433. X    if (Y < 0.0)
  434. X      X += PI;
  435. X    house[i] = Mod(RTOD(X)+SD);
  436. X  }
  437. X}
  438. X
  439. Xvoid HouseMeridian()
  440. X{
  441. X  int i;
  442. X
  443. X  for (i = 1; i <= SIGNS; i++) {
  444. X    D = DTOR(60.0+30.0*(real)i);
  445. X    Y = sin(RA+D);
  446. X    X = atan(Y/(cos(RA+D)*cos(OB)));
  447. X    if (X < 0.0)
  448. X      X += PI;
  449. X    if (Y < 0.0)
  450. X      X += PI;
  451. X    house[i] = Mod(RTOD(X)+SD);
  452. X  }
  453. X}
  454. X
  455. Xvoid HouseRegiomontanus()
  456. X{
  457. X  int i;
  458. X
  459. X  for (i = 1; i <= SIGNS; i++) {
  460. X    D = DTOR(60.0+30.0*i);
  461. X    Y = sin(RA+D);
  462. X    X = atan(Y/(cos(RA+D)*cos(OB)-sin(D)*tan(LA)*sin(OB)));
  463. X    if (X < 0.0)
  464. X      X += PI;
  465. X    if (Y < 0.0)
  466. X      X += PI;
  467. X    house[i] = Mod(RTOD(X)+SD);
  468. X  }
  469. X}
  470. X
  471. Xvoid HousePorphyry()
  472. X{
  473. X  int i;
  474. X
  475. X  X = Asc-MC;
  476. X  if (X < 0.0)
  477. X    X += 360;
  478. X  Y = X/3.0;
  479. X  for (i = 1; i <= 2; i++)
  480. X    house[i+4] = Mod(180.0+MC+i*Y);
  481. X  X = Mod(180.0+MC)-Asc;
  482. X  if (X < 0.0)
  483. X    X += 360;
  484. X  house[1]=Asc;
  485. X  Y = X/3.0;
  486. X  for (i = 1; i <= 3; i++)
  487. X    house[i+1] = Mod(Asc+i*Y);
  488. X  for (i = 1; i <= 6; i++)
  489. X    house[i+6] = Mod(house[i]+180.0);
  490. X}
  491. X
  492. Xvoid HouseMorinus()
  493. X{
  494. X  int i;
  495. X
  496. X  for (i = 1; i <= SIGNS; i++) {
  497. X    D = DTOR(60.0+30.0*(real)i);
  498. X    Y = sin(RA+D)*cos(OB);
  499. X    X = atan(Y/cos(RA+D));
  500. X    if (X < 0.0)
  501. X      X += PI;
  502. X    if (Y < 0.0)
  503. X      X += PI;
  504. X    house[i] = Mod(RTOD(X)+SD);
  505. X  }
  506. X}
  507. X
  508. Xvoid CuspTopocentric()
  509. X{
  510. X  X = atan(tan(LA)/cos(OA));
  511. X  Y = X+OB;
  512. X  LO = atan(cos(X)*tan(OA)/cos(Y));
  513. X  if (LO < 0.0)
  514. X    LO += PI;
  515. X  if (sin(OA) < 0.0)
  516. X    LO += PI;
  517. X}
  518. X
  519. Xvoid HouseTopocentric()
  520. X{
  521. X  real TL, P1, P2, LT;
  522. X  int i;
  523. X
  524. X  modulus = 2.0*PI;
  525. X  house[4] = Mod(DTOR(MC+180.0-SD));
  526. X  TL = tan(LA); P1 = atan(TL/3.0); P2 = atan(TL/1.5); LT = LA;
  527. X  LA = P1; OA = Mod(RA+DTOR(30.0)); CuspTopocentric(); house[5] = Mod(LO+PI);
  528. X  LA = P2; OA = Mod(OA+DTOR(30.0)); CuspTopocentric(); house[6] = Mod(LO+PI);
  529. X  LA = LT; OA = Mod(OA+DTOR(30.0)); CuspTopocentric(); house[1] = LO;
  530. X  LA = P2; OA = Mod(OA+DTOR(30.0)); CuspTopocentric(); house[2] = LO;
  531. X  LA = P1; OA = Mod(OA+DTOR(30.0)); CuspTopocentric(); house[3] = LO;
  532. X  LA = LT; modulus = DEGREES;
  533. X  for (i = 1; i <= 6; i++) {
  534. X    house[i] = Mod(RTOD(house[i])+SD);
  535. X    house[i+6] = Mod(house[i]+180.0);
  536. X  }
  537. X}
  538. X
  539. X
  540. X/* In "null" houses, the cusps are always fixed to start at their            */
  541. X/* corresponding sign, i.e. the 1st house is always at 0 degrees Aries, etc. */
  542. X
  543. Xvoid HouseNull()
  544. X{
  545. X  int i;
  546. X
  547. X  for (i = 1; i <= SIGNS; i++)
  548. X    house[i] = Mod((real)(i-1)*30.0+SD);
  549. X}
  550. X
  551. X
  552. X/* Calculate the house cusp positions, using the specified algorithm. */
  553. X
  554. Xvoid Houses(housesystem)
  555. Xint housesystem;
  556. X{
  557. X  switch (housesystem) {
  558. X  case  1: HouseKoch();          break;
  559. X  case  2: HouseEqual();         break;
  560. X  case  3: HouseCampanus();      break;
  561. X  case  4: HouseMeridian();      break;
  562. X  case  5: HouseRegiomontanus(); break;
  563. X  case  6: HousePorphyry();      break;
  564. X  case  7: HouseMorinus();       break;
  565. X  case  8: HouseTopocentric();   break;
  566. X  case  9: HouseNull();          break;
  567. X  default: HousePlacidus();
  568. X  }
  569. X}
  570. X
  571. X
  572. X/*
  573. X*******************************************************************************
  574. X** Planetary position calculations
  575. X*******************************************************************************
  576. X*/
  577. X
  578. X/* Read the next three values from the planet data stream, and return them */
  579. X/* combined as the coefficients of a quadratic equation in the chart time. */
  580. X
  581. Xreal ReadThree()
  582. X{
  583. X  S = ReadPlanetData(FALSE); S1 = ReadPlanetData(FALSE);
  584. X  S2 = ReadPlanetData(FALSE);
  585. X  return S = DTOR(S+S1*T+S2*T*T);
  586. X}
  587. X
  588. X
  589. X/* Another coordinate transformation. This one is used by the planets() */
  590. X/* procedure to rotate rectangular coordinates by a certain amount.     */
  591. X
  592. Xvoid RecToSph2()
  593. X{
  594. X  RecToPol(X, Y, &A, &R); A += AP; PolToRec(A, R, &X, &Y);
  595. X  D = X; X = Y; Y = 0.0; RecToPol(X, Y, &A, &R);
  596. X  A += IN; PolToRec(A, R, &X, &Y);
  597. X  G = Y; Y = X; X = D; RecToPol(X, Y, &A, &R); A += AN;
  598. X  if (A < 0.0)
  599. X    A += 2.0*PI;
  600. X  PolToRec(A, R, &X, &Y);
  601. X}
  602. X
  603. X
  604. X/* Calculate some harmonic delta error correction factors to add onto the */
  605. X/* coordinates of Jupiter through Pluto, for better accuracy.             */
  606. X
  607. Xvoid ErrorCorrect(ind)
  608. Xint ind;
  609. X{
  610. X  real U, V, W;
  611. X  int IK, IJ, errorindex;
  612. X
  613. X  errorindex = errorcount[ind];
  614. X  for (IK = 1; IK <= 3; IK++) {
  615. X    if (ind == 6 && IK == 3) {
  616. X      T0[3] = 0;
  617. X      return;
  618. X    }
  619. X    if (IK == 3)
  620. X      errorindex--;
  621. X    ReadThree(); A = 0.0;
  622. X    for (IJ = 1; IJ <= errorindex; IJ++) {
  623. X      U = ReadPlanetData(FALSE); V = ReadPlanetData(FALSE);
  624. X      W = ReadPlanetData(FALSE);
  625. X      A = A+DTOR(U)*cos((V*T+W)*PI/180.0);
  626. X    }
  627. X    T0[IK] = RTOD(S+A);
  628. X  }
  629. X}
  630. X
  631. X
  632. X/* Another subprocedure of the planets() routine. Convert the final        */
  633. X/* rectangular coordinates of a planet to zodiac position and declination. */
  634. X
  635. Xvoid ProcessPlanet(ind)
  636. Xint ind;
  637. X{
  638. X  X = XX; Y = YY; RecToPol(X, Y, &A, &R);
  639. X  C = RTOD(A)+NU-BR;
  640. X  if (ind == 1 && AB == 1.0)
  641. X    C = Mod(C+180.0);
  642. X  C = Mod(C+SD); Y = ZZ; X = R; RecToPol(X, Y, &A, &R);
  643. X  P = RTOD(A);
  644. X}
  645. X
  646. X
  647. X/* This is probably the heart of the whole program of Astrolog. Calculate  */
  648. X/* the position of each body that orbits the Sun. A heliocentric chart is  */
  649. X/* most natural; extra calculation is needed to have other central bodies. */
  650. X
  651. Xvoid Planets()
  652. X{
  653. X  real AU, E, EA, E1, XK, XW, YW, XH[BASE+1], YH[BASE+1], ZH[BASE+1];
  654. X  int ind = 1, i;
  655. X
  656. X  ReadPlanetData(TRUE);
  657. X  while (ind <= (operation & DASHu ? BASE : PLANETS+1)) {
  658. X    modulus = 2.0*PI;
  659. X    EA = M = Mod(ReadThree());     /* Calculate mean anomaly */
  660. X    E = RTOD(ReadThree());         /* Calculate eccentricity */
  661. X    for (i = 1; i <= 5; i++)
  662. X      EA = M+E*sin(EA);            /* Solve Keplar's equation */
  663. X    AU = ReadPlanetData(FALSE);    /* Semi-major axis         */
  664. X    E1 = 0.01720209/(pow(AU,1.5)*
  665. X      (1.0-E*cos(EA)));                    /* Begin velocity coordinates */
  666. X    XW = -AU*E1*sin(EA);                   /* Perifocal coordinates      */
  667. X    YW = AU*E1*pow(1.0-E*E,0.5)*cos(EA);
  668. X    AP = ReadThree(); AN = ReadThree();
  669. X    IN = ReadThree();                      /* Calculate inclination       */
  670. X    X = XW; Y = YW; RecToSph2();           /* Rotate velocity coordinates */
  671. X    XH[ind] = X; YH[ind] = Y; ZH[ind] = G; /* Helio ecliptic rectangtular */
  672. X    modulus = DEGREES;
  673. X    if (ind > 1) {
  674. X      XW = XH[ind]-XH[1]; YW = YH[ind]-YH[1];
  675. X    }
  676. X    X = AU*(cos(EA)-E);                 /* Perifocal coordinates for        */
  677. X    Y = AU*sin(EA)*pow(1.0-E*E,0.5);    /* rectangular position coordinates */
  678. X    RecToSph2();                        /* Rotate for rectangular */
  679. X    XX = X; YY = Y; ZZ = G;             /* position coordinates   */
  680. X    if (ind >= 6 && ind <= 10) {
  681. X      ErrorCorrect(ind); XX += T0[2]; YY += T0[1]; ZZ += T0[3];
  682. X    }
  683. X    helioret[ind] = XK =                        /* Helio daily motion */
  684. X      (XX*YH[ind]-YY*XH[ind])/(XX*XX+YY*YY);
  685. X    spacex[ind] = XX; spacey[ind] = YY; spacez[ind] = ZZ;
  686. X    BR = 0.0; ProcessPlanet(ind); AB = 1.0;  /* Convert helio rectangular */
  687. X    helio[ind] = C; helioalt[ind] = P;       /* to spherical coords.      */
  688. X    if (ind > 1) {
  689. X      XX -= spacex[1]; YY -= spacey[1]; ZZ -= spacez[1];  /* Helio to geo */
  690. X      XK = (XX*YW-YY*XW)/(XX*XX+YY*YY);                   /* Geo daily    */
  691. X    }
  692. X    BR = 0.0057756*sqrt(XX*XX+YY*YY+ZZ*ZZ)*RTOD(XK);      /* Aberration     */
  693. X    georet[ind] = XK; ProcessPlanet(ind);                 /* Rectangular to */
  694. X    geo[ind] = C; geoalt[ind] = P;                        /* Spherical      */
  695. X    if (!centerplanet) {
  696. X      planet[ind] = helio[ind]; planetalt[ind] = helioalt[ind];
  697. X      ret[ind] = helioret[ind];
  698. X    } else {
  699. X      planet[ind] = geo[ind]; planetalt[ind] = geoalt[ind];
  700. X      ret[ind] = georet[ind];
  701. X    }
  702. X    if (!(exdisplay & DASHv0))                    /* Use relative velocity   */
  703. X      ret[ind] = DTOR(ret[ind]/helioret[ind]);    /* unless -v0 is in effect */
  704. X    ind += (ind == 1 ? 2 : (ind != PLANETS+1 ? 1 : 10));
  705. X  }
  706. X  spacex[0] = spacey[0] = spacez[0] = 0.0;
  707. X
  708. X  /* A second loop is needed for central bodies other than the Sun or Earth. */
  709. X  /* For example, we can't find the position of Mercury in relation to Pluto */
  710. X  /* until we know the position of Pluto in relation to the Sun, and since   */
  711. X  /* Mercury is calculated before Pluto, another pass needed. (Since Earth   */
  712. X  /* is the first object, a geocentric chart can be done "on the fly".)      */
  713. X
  714. X  if (ind = centerplanet) {
  715. X    for (i = 0; i <= BASE; i++) if (i != 2 && i != ind) {
  716. X      spacex[i] -= spacex[ind]; spacey[i] -= spacey[ind];
  717. X      spacez[i] -= spacez[ind];
  718. X    }
  719. X    spacex[ind] = spacey[ind] = spacez[ind] = 0.0;
  720. X    SwapReal(&spacex[0], &spacex[ind]);
  721. X    SwapReal(&spacey[0], &spacey[ind]);    /* Do some swapping - we want   */
  722. X    SwapReal(&spacez[0], &spacez[ind]);    /* the central body to be in    */
  723. X    SwapReal(&spacex[1], &spacex[ind]);    /* object position number zero. */
  724. X    SwapReal(&spacey[1], &spacey[ind]);
  725. X    SwapReal(&spacez[1], &spacez[ind]);
  726. X  }
  727. X  if (ind > 2)
  728. X    for (i = 1; i <= (operation & DASHu ? BASE : PLANETS+1);
  729. X         i += (i == 1 ? 2 : (i != PLANETS+1 ? 1 : 10))) {
  730. X      XX = spacex[i]; YY = spacey[i]; ZZ = spacez[i];
  731. X      AB = 0.0; BR = 0.0; ProcessPlanet(i);
  732. X      planet[i] = C; planetalt[i] = P;
  733. X      ret[i] = (XX*(YH[i]-YH[ind])-YY*(XH[i]-XH[ind]))/(XX*XX+YY*YY);
  734. X    }
  735. X}
  736. X
  737. X
  738. X/*
  739. X*******************************************************************************
  740. X** Lunar position calculations
  741. X*******************************************************************************
  742. X*/
  743. X
  744. X/* Calculate the position and declination of the Moon, and the Moon's North  */
  745. X/* Node. This has to be done separately from the other planets, because they */
  746. X/* all orbit the Sun, while the Moon orbits the Earth.                       */
  747. X
  748. Xvoid Lunar(moonlo, moonla, nodelo, nodela)
  749. Xreal *moonlo, *moonla, *nodelo, *nodela;
  750. X{
  751. X  real LL, G, N, G1, D, L, ML, L1, MB, M = 3600.0 /*, TN*/;
  752. X
  753. X  LL = 973563.0+1732564379.0*T-4.0*T*T;  /* Compute mean lunar longitude     */
  754. X  G = 1012395.0+6189.0*T;                /* Sun's mean longitude of perigee  */
  755. X  N = 933060.0-6962911.0*T+7.5*T*T;      /* Compute mean lunar node          */
  756. X  G1 = 1203586.0+14648523.0*T-37.0*T*T;  /* Mean longitude of lunar perigee  */
  757. X  D = 1262655.0+1602961611.0*T-5.0*T*T;  /* Mean elongation of Moon from Sun */
  758. X  L = (LL-G1)/M; L1 = ((LL-D)-G)/M;      /* Some auxiliary angles            */
  759. X  F = (LL-N)/M; D = D/M; Y = 2.0*D;
  760. X
  761. X  /* Compute Moon's perturbations. */
  762. X
  763. X  ML = 22639.6*SIND(L)-4586.4*SIND(L-Y)+2369.9*SIND(Y)+769.0*SIND(2.0*L)-
  764. X    669.0*SIND(L1)-411.6*SIND(2.0*F)-212.0*SIND(2.0*L-Y)-206.0*SIND(L+L1-Y);
  765. X  ML += 192.0*SIND(L+Y)-165.0*SIND(L1-Y)+148.0*SIND(L-L1)-125.0*SIND(D)-
  766. X    110.0*SIND(L+L1)-55.0*SIND(2.0*F-Y)-45.0*SIND(L+2.0*F)+40.0*SIND(L-2.0*F);
  767. X
  768. X  *moonlo = G = Mod((LL+ML)/M+SD);       /* Lunar longitude */
  769. X
  770. X  /* Compute lunar latitude. */
  771. X
  772. X  MB = 18461.5*SIND(F)+1010.0*SIND(L+F)-999.0*SIND(F-L)-624.0*SIND(F-Y)+
  773. X    199.0*SIND(F+Y-L)-167.0*SIND(L+F-Y);
  774. X  MB += 117.0*SIND(F+Y)+62.0*SIND(2.0*L+F)-
  775. X    33.0*SIND(F-Y-L)-32.0*SIND(F-2.0*L)-30.0*SIND(L1+F-Y);
  776. X  *moonla = MB =
  777. X    Sgn(MB)*((dabs(MB)/M)/DEGREES-floor((dabs(MB)/M)/DEGREES))*DEGREES;
  778. X
  779. X  /* Compute position of the north node. One can compute the true North */
  780. X  /* Node here if they like, but the Mean Node seems to be the one used */
  781. X  /* in astrology, so that's the one Astrolog returns.                  */
  782. X
  783. X  /*TN = N+5392.0*SIND(2.0*F-Y)-541.0*SIND(L1)-442.0*SIND(Y)+423.0*SIND(2.0*F)-
  784. X    291.0*SIND(2.0*L-2.0*F);
  785. X  TN = Mod(TN/M);*/
  786. X  *nodelo = N = Mod(N/M+SD);
  787. X  *nodela = 0.0;
  788. X}
  789. X
  790. X
  791. X/*
  792. X*******************************************************************************
  793. X** Star position calculations
  794. X*******************************************************************************
  795. X*/
  796. X
  797. X/* Return whether one string is greater than another. */
  798. X
  799. Xint StrCmp(s1, s2)
  800. Xchar *s1, *s2;
  801. X{
  802. X  while (*s1 == *s2)
  803. X    s1++, s2++;
  804. X  return *s1 > *s2;
  805. X}
  806. X
  807. X
  808. X/* This is used by the chart calculation routine to calculate the positions */
  809. X/* of the fixed stars. Since the stars don't move in the sky over time,     */
  810. X/* getting their positions is mostly just reading in a data stream and      */
  811. X/* converting it to the correct reference frame. However, we have to add in */
  812. X/* the correct precession for the tropical zodiac, and sort the final index */
  813. X/* list based on what order the stars are supposed to be printed in.        */
  814. X
  815. Xvoid CastStar(SD)
  816. Xreal SD;
  817. X{
  818. X  int i, j;
  819. X  real x, y, z;
  820. X  ReadStarData(TRUE);
  821. X
  822. X  /* Read in star positions. */
  823. X
  824. X  for (i = 1; i <= STARS; i++) {
  825. X    x = ReadStarData(FALSE); y = ReadStarData(FALSE); z = ReadStarData(FALSE);
  826. X    planet[BASE+i] = DTOR(x*DEGREES/24.0+y*15.0/60.0+z*0.25/60.0);
  827. X    x = ReadStarData(FALSE); y = ReadStarData(FALSE); z = ReadStarData(FALSE);
  828. X    planetalt[BASE+i] = DTOR(x+y/60.0+z/60.0/60.0);
  829. X    equtoecl(&planet[BASE+i], &planetalt[BASE+i]);           /* Convert to */
  830. X    planet[BASE+i] = Mod(RTOD(planet[BASE+i])+SD2000+SD);    /* ecliptic.  */
  831. X    planetalt[BASE+i] = RTOD(planetalt[BASE+i]);
  832. X    starname[i] = i;
  833. X  }
  834. X
  835. X  /* Sort the index list if -Uz, -Ul, -Un, or -Ub switch in effect. */
  836. X
  837. X  if (universe > 1) for (i = 2; i <= STARS; i++) {
  838. X    j = i-1;
  839. X
  840. X    /* Compare star names for -Un switch. */
  841. X
  842. X    if (universe == 'n') while (j > 0 && StrCmp(
  843. X      objectname[BASE+starname[j]], objectname[BASE+starname[j+1]])) {
  844. X      SWAP(starname[j], starname[j+1]);
  845. X      j--;
  846. X
  847. X    /* Compare star brightnesses for -Ub switch. */
  848. X
  849. X    } else if (universe == 'b') while (j > 0 &&
  850. X      starbright[starname[j]] > starbright[starname[j+1]]) {
  851. X      SWAP(starname[j], starname[j+1]);
  852. X      j--;
  853. X
  854. X    /* Compare star zodiac locations for -Uz switch. */
  855. X
  856. X    } else if (universe == 'z') while (j > 0 &&
  857. X      planet[BASE+starname[j]] > planet[BASE+starname[j+1]]) {
  858. X      SWAP(starname[j], starname[j+1]);
  859. X      j--;
  860. X
  861. X    /* Compare star declinations for -Ul switch. */
  862. X
  863. X    } else if (universe == 'l') while (j > 0 &&
  864. X      planetalt[BASE+starname[j]] < planetalt[BASE+starname[j+1]]) {
  865. X      SWAP(starname[j], starname[j+1]);
  866. X      j--;
  867. X    }
  868. X  }
  869. X}
  870. X
  871. X
  872. X/*
  873. X*******************************************************************************
  874. X** Calculate chart for specific time
  875. X*******************************************************************************
  876. X*/
  877. X
  878. X/* This is probably the main routine in all of Astrolog. It generates a   */
  879. X/* chart, calculating the positions of all the celestial bodies and house */
  880. X/* cusps, based on the current chart information, and saves them for use  */
  881. X/* by any of the display routines.                                        */
  882. X
  883. Xreal CastChart(var)
  884. Xint var;
  885. X{
  886. X  int i, k;
  887. X
  888. X  real housetemp[SIGNS+1], Off = 0.0, j;
  889. X  if (M == -1.0) {
  890. X
  891. X    /* Hack: If month is negative, then we know chart was read in through a  */
  892. X    /* -o0 position file, so the planet positions are already in the arrays. */
  893. X
  894. X    MC = planet[18]; Asc = planet[19]; Vtx = planet[20];
  895. X  } else {
  896. X    Off = ProcessInput(var);
  897. X    ComputeVariables();
  898. X    if (operation & DASHG)          /* Check for -G geodetic chart. */
  899. X      RA = DTOR(Mod(-L5));
  900. X    MC  = CuspMidheaven();          /* Calculate our Ascendant & Midheaven. */
  901. X    Asc = CuspAscendant();
  902. X    Houses(housesystem);            /* Go calculate house cusps. */
  903. X    for (i = 1; i <= total; i++)
  904. X      ret[i] = 1.0;                 /* Assume direct until we say otherwise. */
  905. X
  906. X    /* Go calculate planet, Moon, and North Node positions. */
  907. X
  908. X    Planets();
  909. X    Lunar(&planet[2], &planetalt[2], &planet[16], &planetalt[16]);
  910. X    ret[16] = -1.0;
  911. X
  912. X    /* Calculate position of Part of Fortune. */
  913. X
  914. X    j = planet[2]-planet[1];
  915. X    j = dabs(j) < 90.0 ? j : j - Sgn(j)*DEGREES;
  916. X    planet[17] = Mod(j+Asc);
  917. X
  918. X    /* Fill in "planet" positions corresponding to house cusps. */
  919. X
  920. X    planet[18] = MC; planet[19] = Asc; planet[20] = Vtx;
  921. X    planet[21] = house[11]; planet[22] = house[12];
  922. X    planet[23] = house[2];  planet[24] = house[3];
  923. X  }
  924. X  if (universe)                               /* Go calculate star positions */
  925. X    CastStar(operation & DASHs ? 0.0 : -Off); /* if -U switch in effect.     */
  926. X
  927. X  /* Now, we may have to modify the base positions we calculated above based */
  928. X  /* on what type of chart we are generating.                                */
  929. X
  930. X  if (operation & DASHp0) {         /* Are we doing a -p0 solar arc chart?   */
  931. X    for (i = 1; i <= total; i++)
  932. X      planet[i] = Mod(planet[i] + (Jdp - JD) / progday);
  933. X    for (i = 1; i <= SIGNS; i++)
  934. X      house[i]  = Mod(house[i]  + (Jdp - JD) / progday);
  935. X    }
  936. X  if (multiplyfactor > 1)           /* Are we doing a -x harmonic chart?     */
  937. X    for (i = 1; i <= total; i++)
  938. X      planet[i] = Mod(planet[i] * (real)multiplyfactor);
  939. X  if (onasc) {
  940. X    if (onasc > 0)                  /* Is -1 put on Ascendant in effect?     */
  941. X      j = planet[onasc]-Asc;
  942. X    else                            /* Or -2 put object on Midheaven switch? */
  943. X      j = planet[-onasc]-MC;
  944. X    for (i = 1; i <= SIGNS; i++)    /* If so, rotate the houses accordingly. */
  945. X      house[i] = Mod(house[i]+j);
  946. X  }
  947. X
  948. X  /* Check to see if we are -F forcing any objects to be particular values. */
  949. X
  950. X  for (i = 1; i <= total; i++)
  951. X    if (force[i] != 0.0) {
  952. X      planet[i] = force[i]-DEGREES;
  953. X      planetalt[i] = ret[i] = 0.0;
  954. X    }
  955. X  HousePlace();                /* Figure out what house everything falls in. */
  956. X
  957. X  /* If -f domal chart switch in effect, switch planet and house positions. */
  958. X
  959. X  if (operation & DASHf) {
  960. X    for (i = 1; i <= total; i++) {
  961. X      k = inhouse[i];
  962. X      inhouse[i] = (int) (planet[i]/30.0)+1;
  963. X      planet[i] = (real)(k-1)*30.0+MinDistance(house[k], planet[i])/
  964. X        MinDistance(house[k], house[Mod12(k+1)])*30.0;
  965. X    }
  966. X    for (i = 1; i <= SIGNS; i++) {
  967. X      k = HousePlaceIn((real) (i-1)*30.0);
  968. X      housetemp[i] = (real)(k-1)*30.0+MinDistance(house[k],
  969. X        (real) (i-1)*30.0)/MinDistance(house[k], house[Mod12(k+1)])*30.0;
  970. X    }
  971. X    for (i = 1; i <= SIGNS; i++)
  972. X      house[i] = housetemp[i];
  973. X  }
  974. X
  975. X  /* If -3 decan chart switch in effect, edit planet positions accordingly. */
  976. X
  977. X  if (operation & DASH3)
  978. X    for (i = 1; i <= total; i++) {
  979. X      k = (int) (planet[i]/30.0)+1;
  980. X      j = planet[i] - (real)((k-1)*30);
  981. X      k = Mod12(k + 4*((int)floor(j/10.0)));
  982. X      j = (j - floor(j/10.0)*10.0)*3.0;
  983. X      planet[i] = (real)(k-1)*30.0+j;
  984. X      HousePlace();
  985. X    }
  986. X  return T;
  987. X}
  988. X
  989. X/* formulas.c */
  990. END_OF_FILE
  991. if test 28398 -ne `wc -c <'formulas.c'`; then
  992.     echo shar: \"'formulas.c'\" unpacked with wrong size!
  993. fi
  994. # end of 'formulas.c'
  995. fi
  996. if test -f 'Helpfile.p3' -a "${1}" != "-c" ; then 
  997.   echo shar: Will not clobber existing file \"'Helpfile.p3'\"
  998. else
  999. echo shar: Extracting \"'Helpfile.p3'\" \(29711 characters\)
  1000. sed "s/^X//" >'Helpfile.p3' <<'END_OF_FILE'
  1001. X**************************************
  1002. XDATA DEFAULTS AND COMPILE TIME OPTIONS
  1003. X**************************************
  1004. X
  1005. X     Astrolog includes the ability to search an input file for
  1006. Xvarious default parameters to use in the program. This allows one to
  1007. Xeasily change major defaults without having to recompile the program,
  1008. Xwhich is useful if, say, one receives a compiled executable from a
  1009. Xfriend who had a different configuration. The program looks for the
  1010. Xfile "astrolog.dat" in the current directory, and if not there, looks
  1011. Xfor it in the default directory. Parameters in this file will
  1012. Xoverride any defaults compiled into the program, although the highest
  1013. Xpriority is still given to the command line options. Note one doesn't
  1014. X*have* to have this file in order to run the program - if not found
  1015. XAstrolog will still run as before using the compile time defaults.
  1016. X
  1017. X     Presently, the parameters one can change in this file are:
  1018. Xdefault time zone (as indicated with -z option), default longitude
  1019. Xand latitude (as in -l option), number of aspects (-A option), and
  1020. Xdefault house system to use (values as in -c option). Next is whether
  1021. Xthe -k Ansi graphics should always be in effect. If the value here is
  1022. Xnon-zero, then it is assumed -k is always in affect, and one needs
  1023. Xthen to use the -k switch to return to normal. This is recommended
  1024. Xfor PC users who display charts on the screen more often than they
  1025. Xprint one out. After this is the default number of rows per house to
  1026. Xpass to the -w wheel chart option. Next, the value of the minor
  1027. Xcompile time variable DIVISIONS may be changed in the file. This
  1028. Xvalue tells how many "segments" we should divide each day, etc, when
  1029. Xdoing aspect or transit searches (-d or -T). More segments is slower
  1030. Xbut can be more accurate by a minute or two. I suggest a value of 24
  1031. Xhere for Unix systems and 8 for PC's, but now it is easy to
  1032. Xexperiment to see what would be best for you.
  1033. X
  1034. X     Then in the astrolog.dat file come default restriction values
  1035. X(as with the -R option) for the first 20 objects (0 = active, 1 =
  1036. Xrestricted). Some people just don't like or care about the various
  1037. Xminor bodies such as the asteroids, Chiron, Part of Fortune, etc.,
  1038. Xand think that they clutter up the various charts. This is a good way
  1039. Xto keep them from showing up by default (one can still use the -R
  1040. Xoption to get back any objects eliminated here.) This is immediately
  1041. Xfollowed by a similar restriction list for planets when transiting in
  1042. Xthe -T charts. Next come the default orbs (as with the -Ao option)
  1043. Xfor the 18 aspects. Then comes a list of the maximum orbs of any
  1044. Xaspect allowed to the first 20 objects (as with the -Am option), and
  1045. Xafter this is a list of the amount to widen aspect orbs to the first
  1046. X20 objects (as with the -Ad option.) Then, for the -j influence
  1047. Xinterpretation chart, four values indicating the power given to
  1048. Xplanets in ruling sign, planets exalted in sign, planets in ruling
  1049. Xhouse, and planets exalted in house, may be specified. Finally in the
  1050. Xfile, comes a long list of the main influence values used by the -j
  1051. Xoption, i.e. the power values of each of the first 20 planet objects,
  1052. Xof the 12 houses, and of the 18 aspects.
  1053. X
  1054. X"Smart cusps" feature: This is a yet another setting, a simple yes/no
  1055. Xoption that will only affect the way -T transit lists are displayed.
  1056. XIt can only be set in this astrolog.dat file. If the value there is
  1057. Xnon-zero, then transits to minor house cusps will be processed in a
  1058. Xmore intuitive manner. First of all, aspects other than conjunctions
  1059. Xor oppositions to minor cusps will be ignored, e.g. a trine to the
  1060. X11th house is redundant and isn't really useful; we are more
  1061. Xinterested in the conjunction to the 3rd house cusp. Minor aspects
  1062. Xto the Ascendant and Midheaven, and all other objects, are left
  1063. Xalone. In addition, with smart cusps active, oppositions to minor
  1064. Xhouse cusps will be printed as conjunctions to the opposing cusp,
  1065. Xe.g. instead of "Jupiter Opp 3rd Cusp", we have the more logical
  1066. X"Jupiter Con 9th Cusp". This is just another way to make transits
  1067. Xcharts clearer and less confusing.
  1068. X
  1069. X"80 column clip" feature: This is another yes/no option that can only
  1070. Xbe set in astrolog.dat. If set to non-zero, then we guarantee that no
  1071. Xtext chart when displayed will overflow 80 columns. By default, with
  1072. Xall objects unrestricted, certain charts will have rows more than 80
  1073. Xcolumns long, breaking up the chart making it very difficult to read.
  1074. XThe -r0 -g relationship aspect grid, and the -E ephemeris listing,
  1075. Xwill normally go beyond the 80th column. With this feature however,
  1076. Xthese and other charts that can go beyond column 80, such as -L when
  1077. Xuranians are unrestricted, will always be displayed on one line, with
  1078. Xcolumns that would go beyond the 80th not getting printed.
  1079. X
  1080. X     About the only major thing that one *can't* change in the file
  1081. Xis the default directory path in which the program looks in for input
  1082. Xfiles if not in the current directory, since Astrolog needs the
  1083. Xdefault directory in order to be able to locate the file in the first
  1084. Xplace! The standard "astrolog.dat" file included with the release of
  1085. Xthe program has some "comment lines" describing what is contained in
  1086. Xeach line. One can chance or delete comments as long as they make
  1087. Xsure that an equals sign ('=') immediately proceeds any value or list
  1088. Xof values, since the program uses this character to determine where
  1089. Xcomments end.
  1090. X
  1091. X     Astrolog.dat files for versions 2.40 and before won't work with
  1092. Xversion 3.00, because there are additional definable parameters and
  1093. Xtables inserted in this file for 3.00. Attempting to read in such an
  1094. Xold file into version 3.00 will result in an error message saying one
  1095. Xshould upgrade the old file or delete it.
  1096. X
  1097. X--
  1098. X
  1099. X     I often use Astrolog to look at and compare files containing
  1100. Xcharts of various people. I have many chart files, so I keep them in
  1101. Xa separate directory. Since it is always a pain to have to cd into
  1102. Xthis special directory all the time, there is a DEFAULT_DIR string to
  1103. Xbe set at compile time. Whenever the program reads in a chart file
  1104. Xwith the -i option, it will first look in the current directory for
  1105. Xit. If it's not found there, Astrolog will then look for a file of
  1106. Xthe same name in the special default directory.
  1107. X
  1108. X     A couple of Astrolog users have said to me that their computer
  1109. X(for example, Mac's) won't accept command switches on the command
  1110. Xline (like they boot Astrolog from a menu for instance.) Therefore,
  1111. Xthey aren't able to access many features in the normal way. If this
  1112. Xis the case with your system (or if you just don't like command line
  1113. Xoptions), then comment out the '#define SWITCHES' line at the
  1114. Xbeginning of the astrolog.h file. If you do this, then the program
  1115. Xwill ignore any switches and prompt you to enter them manually at the
  1116. Xvery beginning of program execution.
  1117. X
  1118. X     A couple of other compile time option variables are in the
  1119. Xinclude file astrolog.h: For those people who don't like Placidus, a
  1120. Xdefault house system can be set by changing the value of
  1121. XDEFAULT_SYSTEM to the value from 0..9 indicating what system to use
  1122. Xif the user doesn't explicitly specify it with -c. Another thing: It
  1123. Xshould be mentioned that although the accuracy of Sun..Pluto, Chiron,
  1124. Xand the Uranians are to the nearest minute (for years 1900-2000), the
  1125. Xfour asteroids are relatively inaccurate and can even be a couple of
  1126. Xdegrees off in the worst case.
  1127. X
  1128. X     There is a special compile time variable dealing with graphics
  1129. X(in addition to the "X11" one) called "GRAPH". One comments out the
  1130. X#define GRAPH line if they don't want graphics, and not just if they
  1131. Xdon't have X windows. In other words, one can generate most of
  1132. XAstrolog's graphics charts even if they don't have X windows. Now,
  1133. Xwhen GRAPH is defined but X11 isn't, the program will generate the
  1134. Xcharts, but just never try to bring up a window; it will simply
  1135. Xalways assume that you are writing a bitmap file. The bitmap file
  1136. Xwill contain a (unfortunately always black and white) image of what
  1137. Xwould normally be in the window, just as the -Xb switch does. One can
  1138. Xthen use various graphics utilities to convert the image into
  1139. Xsomething they can display on their system if they can't do so using
  1140. Xany of the available bitmap modes. (Any system that can compile
  1141. XAstrolog should be able to compile in the non X window graphics
  1142. Xfeatures as well.)
  1143. X
  1144. X     A bitmap output mode other than the Windows .bmp bitmaps and
  1145. Xstandard ones that can be read with the Unix X11 xsetroot command is
  1146. Xallowed in the graphics routines. If one changes the BITMAPMODE
  1147. Xcompile time option in astrolog.h to the character 'A' when
  1148. Xcompiling, or invokes the -Xb switch as -Xba, then all bitmaps output
  1149. Xwill be in a straight Ascii form, with one character corresponding to
  1150. Xeach pixel. This format is identical to the result produced by the
  1151. XUnix command bmtoa, and it can be converted back into a bitmap with
  1152. Xthe Unix command atobm. Although not as efficient spacewise, this is
  1153. Xa simpler format, and is recommended for those without X windows who
  1154. Xare still using Astrolog's graphics, if they want to write their own
  1155. Xconversion program.
  1156. X
  1157. X
  1158. X********************************
  1159. XDESCRIPTION OF X WINDOW FEATURES
  1160. X********************************
  1161. X
  1162. X     One of the most impressive features of the program are the X
  1163. Xwindows features, which are generally accessed in the program via the
  1164. X-X switch and derivatives of it on the command line. There are five
  1165. Xdifferent types of chart displays: A standard graphic display of a
  1166. Xwheel chart in a window (with glyphs, aspects in the center, etc),
  1167. Xgraphic displays of the Astro-graph charts (which look almost
  1168. Xidentical to the Astro*Carto*Graphy maps from Jim Lewis) complete
  1169. Xwith all the labeled lines drawn on a map of the world (like the -L
  1170. Xoption), aspect/midpoint grids showing the aspects and orbs in effect
  1171. Xbetween every body in a chart (like -g option), a local sky chart
  1172. Xshowing where each planet is located on a map of the local horizon
  1173. Xarea (as in -Z), and a space chart showing an aerial view of the
  1174. Xsolar system (as in -S). The X wheel and aspect grid charts can
  1175. Xdisplayed in a different form to accommodate relationship comparison
  1176. Xcharts. There are also other commands that can be given to the
  1177. Xwindow once it is up and running, which can do other things, such as
  1178. Xcontinually update the window every few seconds to the current status
  1179. X(i.e. an extended version of the -n option) as well as other forms of
  1180. Xanimation. Note that the program is still text based, and one can
  1181. Xeasily turn off all the X features by commenting out the #define X11
  1182. Xin astrolog.h if they don't have X windows.
  1183. X
  1184. X     Probably the only thing more impressive than the X window
  1185. Xfeatures are the X window features displayed on color monitors. (The
  1186. Xcharts displayed in color are *much* more eye catching than the B/W
  1187. Xones, IMHO.) Here is how the colors have been assigned for the
  1188. Xvarious charts: Four colors have been allocated for the four elements
  1189. X- Fire = Red, Earth = Brown, Air = Green, Water = Blue. The various
  1190. Xsign glyphs (and the corresponding house labels) are in the color of
  1191. Xtheir element. Planets are in the color of the sign of their main
  1192. Xruler. Chiron and the four asteroids are Gold, while the north node,
  1193. Xand other non-physical objects like the fortune and vertex are
  1194. XViolet. Representations of the Ascendant/ Descendant/ Midheaven/
  1195. XNadir (in the astro-graph map lines and elsewhere) are in the element
  1196. Xcolor of the corresponding sign/house that the angular lines refer
  1197. Xto, i.e. Ascendant = Red, Midheaven = Brown, Descendant = Green,
  1198. XNadir = Blue. A few extra things have been added for color wheel
  1199. Xcharts only: dark gray lines marking off each house (in addition to
  1200. Xthe main lines on the horizon and meridian), and each degree instead
  1201. Xof every 5th degree being marked in dark gray on the outer circle
  1202. X(every 5th degree being white). Aspects lines are colored too, as
  1203. Xfollows: Conjunctions = Yellow, Sextiles = Light Blue, Squares = Red,
  1204. XTrines = Green, Oppositions = Dark Blue. For the minor aspects we
  1205. Xhave: Inconjuncts/Semisextiles = Brown, Semisquares/
  1206. XSesquiquadratures = Orange, (Bi/Semi)Quintiles = Violet,
  1207. X(Bi/Tri)Septiles = Gold, (Bi/Quatro)Noviles = Pink.
  1208. X
  1209. X     For color X terminals, the -XG globe display and -XW world map
  1210. Xdisplay are done with the continents in different colors! This makes
  1211. Xthem look much better than monochrome maps. Each of the seven
  1212. Xcontinents is in a different color of the rainbow, and the colors are
  1213. Xchosen to correspond to the appropriate chakra (etheric energy vortex
  1214. Xalong the human spine) that goes with each land mass. They are:
  1215. XAfrica - red - Root chakra, Australia - orange - Navel chakra, South
  1216. XAmerica - yellow - Solar plexus chakra, North America - green - Heart
  1217. Xchakra, Europe - blue - Throat chakra, Asia - indigo - Third Eye
  1218. Xchakra, Antarctica - violet - Crown chakra. Major lakes are, of
  1219. Xcourse, colored navy blue.
  1220. X
  1221. X--
  1222. X
  1223. X-v -X: The X wheel charts have their graphic information organized as
  1224. Xfollows: There's an outer circle showing the signs and sign glyphs,
  1225. Xinside of which is a smaller circle divided up into 5 degree
  1226. Xincrements to make determining exact degrees easier. Inside of this
  1227. Xis a circle divided up into the 12 houses labeled with numbers. The
  1228. Xentire chart is divided by two dashed lines through the Ascendant/
  1229. XDescendant (which is always horizontal of course) and the
  1230. XMidheaven/Nadir. Inside the house circle are the planet glyphs in
  1231. Xtheir appropriate positions. Small pointer lines run from each glyph
  1232. Xto just before single dots. These dots indicate the precise locations
  1233. Xin the zodiac of each object. The pointer lines (which are dashed if
  1234. Xthe object is retrograde and solid otherwise) are necessary so as not
  1235. Xto have to draw planet glyphs on top of one another when planets are
  1236. Xconjunct. Inside the ring of the single dots, are the aspect lines
  1237. Xconnecting these positions. Since the default number of aspects to
  1238. Xuse is just the 5 majors, one can determine which aspect is in place
  1239. Xjust by looking at the aspect line. The accuracy of the aspect is
  1240. Xdetermined by the dashedness of the line: A solid line means the orb
  1241. Xis < 2 degrees; a dashed line means the orb is < 4 degrees; a really
  1242. Xdashed line mean the orb is < 6 degrees, etc.
  1243. X
  1244. X-L -X: The X astro-graph charts are organized as follows: A map of
  1245. Xthe world is shown. The edges of the map are labeled with ruler lines
  1246. Xthat are 5 degrees apart (with longer ruler lines for more important
  1247. Xlongitudes and latitudes, like those that are multiples of 10, 30,
  1248. Xetc.) The equator is labeled with a dashed line. The polar regions of
  1249. Xthe world aren't shown; the map shown ranges from 60 degrees S
  1250. Xlatitude to 75 degrees N latitude. Note that each pixel on the screen
  1251. Xrepresents exactly one half a degree on the world. (For -Xs 100 the
  1252. Xratio is one pixel to one degree, and for -Xs 300 the ratio is one
  1253. Xpixel to 1/3 degree.) On this map are drawn the lines indicating
  1254. Xwhere on the world the various planets are angular at the time in
  1255. Xquestion. (Note: you might want to -R restrict some objects because
  1256. Xotherwise the map tends to get pretty cluttered with lines.) As
  1257. Xexpected, Midheaven and Nadir lines are vertical, and the Ascendant
  1258. Xand Descendant lines are curved. Little square boxes on the Midheaven
  1259. Xlines indicate the exact zenith latitude location. Each line is
  1260. Xlabeled at the top or the bottom of the screen, showing what planet
  1261. Xis in question and (sometimes) what angle is in question. All
  1262. XAscendant and Midheaven lines are labeled at the bottom of the
  1263. Xscreen, and all Descendant and Nadir lines are labeled at the top.
  1264. XEach line goes a bit beyond to the top or bottom of the world map,
  1265. Xand then another pointer segment (which is again dashed of the object
  1266. Xin question is retrograde) goes and points to the planet glyph. There
  1267. Xis a capital "A" or "M" under each of the glyphs at the bottom of the
  1268. Xscreen, explicitly indicating whether the line is an Ascendant or
  1269. XMidheaven line. At the top of the screen, however, there are only the
  1270. Xglyphs, but one can still determine whether these lines are
  1271. XDescendant or Nadir lines based on whether they are curved or not.
  1272. XNote that not all the Descendant lines are labeled; this is because
  1273. Xsome of the Ascendant/Descendant lines actually connect near the top
  1274. Xof the screen and don't actually cross it. This graphic astro-graph
  1275. Xchart will display a small purple dot at the precise point on the
  1276. Xworld map for which the chart in question is being generated. This is
  1277. Xuseful to help see how close the various planetary lines are to you,
  1278. Xif you live in the middle of the continent or someplace not easily
  1279. Xdeterminable on the compact map of the world.
  1280. X
  1281. X-g -X: Aspect grid windows with the appropriate aspect glyphs can be
  1282. Xdisplayed by combining the -g option with the -X option (astrolog -g
  1283. X-X). Both the split aspect/midpoint grids labeled down the diagonal,
  1284. Xas well as the relationship aspect grids between two charts (astrolog
  1285. X-r <file1> <file2> -g -X) are supported. The aspects glyphs, objects,
  1286. Xand the signs in the grids are in their colors as defined earlier.
  1287. XLike the astro-graph windows, these charts can't be resized in the
  1288. Xnormal way unless one uses the '>' and '<' keys. For anything less
  1289. Xthan the largest scale size (achieved with the switch -Xs 300, or by
  1290. Xpressing '>' within a window) all that will be displayed in each
  1291. Xaspect grid cell is the glyphs of the aspect in effect, the planet
  1292. Xbeing aspected, or the sign of the midpoint. However, once the
  1293. Xlargest scale size is reached, there is room in each cell to display
  1294. Xthe aspect orb to the nearest minute off of exact (with a plus or
  1295. Xminus sign indicating whether the actual angle is slightly greater
  1296. Xthan or less than exact); the degree and minute in addition to the
  1297. Xsign for midpoints; and the degree and sign location for each planet
  1298. Xthat's in the grid. Remember, the ASCII aspect grids in the text
  1299. Xoptions are rather limited, only displaying orbs to the nearest 0.1
  1300. Xdegree, midpoints to the nearest degree, as well as the confusing '.'
  1301. Xvs. ',' for angles slightly greater or less than exact (not to
  1302. Xmention leaving the vertex out for the relationship grids between two
  1303. Xcharts). Well no longer: with X11, we can see *real* aspect grids
  1304. Xwith Astrolog!
  1305. X
  1306. X-Z -X: The -Z local horizon feature can be displayed in an X window
  1307. Xas well (e.g. astrolog -Z -X), in which all the planets will be
  1308. Xdisplayed in a window depicting the sky. The small dot above or below
  1309. Xeach glyph indicates exactly where each planet is. (Some of the
  1310. Xglyphs may be overlapping, although the program tries to cut down on
  1311. Xthis.) There is a horizontal line dividing the window representing
  1312. Xthe local horizon; planets above this line are visible, while planets
  1313. Xbelow it are set. There are three vertical lines dividing the window
  1314. Xas well: The middle line represents the due south direction, the one
  1315. Xto the left is due east, the one to the right is due west, and the
  1316. Xedges of the window are due north. Like the standard chart display,
  1317. Xthis window may be resized to any proportion. One can press the 'Z'
  1318. Xkey in any window to enter this display type in that window at any
  1319. Xtime.
  1320. X
  1321. X-Z0 -X: An additional graphics chart is available through the -Z0
  1322. Xswitch: local horizon charts suitable for stargazing. As we know, the
  1323. Xnormal -Z switch generates a listing of the planets with respect to
  1324. Xthe local horizon, and the -Z combined with the -X switch generates a
  1325. Xgraphic image of the planets and stars on the local horizon. This
  1326. Xchart assumes one is facing due south, and is divided left to right
  1327. Xby the horizon line, with straight up being toward the top of the
  1328. Xscreen and straight down toward the bottom. This is a good chart,
  1329. Xespecially for noticing the rising and setting of planets and other
  1330. Xobjects, but the fact that the meridian is split up causes distortion
  1331. Xwhen trying to view objects high up in the sky. Therefore, if one
  1332. Xcombines this -Z0 switch with the -X switch, a new differently
  1333. Xoriented local horizon chart will be displayed. Here, the zenith
  1334. Xpoint straight up is in the center of the screen, and the horizon
  1335. Xline is a surrounding circle. Due north is along the line from the
  1336. Xcenter to the top of the screen, due south is on the line from the
  1337. Xcenter to the bottom, east is to the left, and west is to the right.
  1338. XIn other words, this is just like what one would see if they were
  1339. Xlying on their back looking straight up with their feet to the south,
  1340. Xso this should be better for stargazing. Outside the circle marks
  1341. Xwhat's below the horizon, and the extreme corners of the screen mark
  1342. Xthe nadir - what's straight down. As with the normal -Z graphic
  1343. Xchart, this one has the various axes marked at five degree
  1344. Xincrements.
  1345. X
  1346. X-S -X: The -S switch can be combined with -X to give an X window
  1347. Xchart of the solar system. This will be displayed as an aerial view
  1348. Xof the entire solar system, with 0 degrees Aries to the left of the
  1349. Xscreen, and 0 degrees Cancer to the bottom. Note that this chart
  1350. Xincludes all possible planets, including the Earth (whose glyph is a
  1351. Xcross inside a circle). Whatever object is chosen to be the central
  1352. Xbody is at the center of the screen, with all the others around it.
  1353. XThis is a fun chart to animate - watch the planets go around the Sun,
  1354. Xand *see* how they turn retrograde with respect to the Earth. In
  1355. Xaddition to the bodies themselves, twelve spokes are drawn from the
  1356. Xcenter body to the edge of the screen, which delineate the zodiac
  1357. Xwith respect to it. Note that the scale of the solar system is large;
  1358. Xattempting to fit all the planets out to Pluto on the screen at once
  1359. Xwill cause all the inner planets to be crammed together near the
  1360. Xmiddle of the screen. To deal with this, the scale size as indicated
  1361. Xwith the -Xs switch and the '<' and '>' keys will affect how much of
  1362. Xthe solar system is viewed at once (in addition to the glyph sizes).
  1363. XFor a scale size of 300, the viewport will have a radius of 6 AU
  1364. X(about out to the orbit of Jupiter; useful for viewing the inner
  1365. Xplanets). For a scale size of 200 (default), it will have a radius of
  1366. X30 AU (enough to include Neptune, and Pluto most of the time).
  1367. XFinally, a scale size of 100 will result in a radius of 90 AU, enough
  1368. Xto easily include the entire solar system, as well as the orbits of
  1369. Xthe alleged Uranian bodies beyond Pluto.
  1370. X
  1371. X-r0 -X: True relationship wheel charts can be displayed in a window,
  1372. Xi.e. where the planets of both charts are displayed in separate rings
  1373. Xof the same wheel. Use the -r0 option to display this comparison
  1374. Xtype. For example, for the command "astrolog -r0 person1 person2 -X",
  1375. Xthe following is displayed: The signs and houses as in person1's
  1376. Xchart are drawn in the outermost part of the wheel. Inside this is a
  1377. Xring of person2's planets as displayed in person1's houses, and
  1378. Xinside of this are person1's own planets. Finally at the very middle
  1379. Xis an aspect grid, which shows those aspects that are occurring
  1380. Xbetween the objects in the two charts. Basically this is just the
  1381. Xstandard wheel chart for person1, except that person2's planets are
  1382. Xin an outer ring of objects and the aspect grid shows the aspects of
  1383. Xthe relationship. Putting such a chart in animation mode only affects
  1384. Xperson2's planets, so this is a great way to analyze transits: Doing
  1385. X"astrolog -t yourchartfile -X" will show all your current transits,
  1386. Xand allow you to easily animate the transiting planets through your
  1387. Xnatal signs and houses.
  1388. X
  1389. X--
  1390. X
  1391. X     A couple of conveniences for the graphics features exist. Note
  1392. Xthat the -Xo <bitmapfilename> option is only used in conjunction with
  1393. Xthe -Xb write output to bitmap switch. Therefore, -Xo automatically
  1394. Xassumes -Xb is set. (Invoking -Xb itself without -Xo will have the
  1395. Xprogram prompt the user for the bitmap filename.) In other words,
  1396. Xastrolog -Xb -Xo 'file' is the same as just astrolog -Xo 'file'.
  1397. XAlso, I should mention that Astrolog includes its own appropriate
  1398. Xbitmap (a rainbow over an opened Third Eye) if one iconifies the
  1399. Xwindow, instead of reverting to the braindead UnknownIcon :)
  1400. X
  1401. X
  1402. X***********************************
  1403. XDESCRIPTION OF PC GRAPHICS FEATURES
  1404. X***********************************
  1405. X
  1406. X     Astrolog's PC graphics charts look and feel and are displayed
  1407. Xjust like the X window graphics already described. When compiling,
  1408. Xone has a choice between four options: (1) choose no graphics
  1409. Xabilities at all, (2) compile so that graphic chart bitmaps can be
  1410. Xgenerated and output to a file, (3) compile allowing file graphics in
  1411. Xaddition to direct screen graphics in X windows, and now (4) compile
  1412. Xwith file graphics and direct graphics on the screen of a PC. The
  1413. Xaddition of PC graphics in no way inhibit or affect the X window
  1414. Xgraphics already in place; it's merely a matter of which compile time
  1415. Xoptions are set. Unix users don't need to look at this section.
  1416. X
  1417. X     Astrolog uses the Microsoft PC graphics library as defined in
  1418. Xthe file graph.h included with their C7 "C" language compiler. This
  1419. Xfile and the graphics.lib library is needed in order to be able to
  1420. Xcompile with these graphics options set, just as the X window
  1421. Xlibraries are needed to compile with those graphics included. If
  1422. Xunavailable, one can still access these PC graphics with the library
  1423. Xlinked in, in the already compiled executable posted.
  1424. X
  1425. X     PC Astrolog is a DOS program and should be run from a DOS
  1426. Xprompt, outside of any Windows system. To generate a graphics chart
  1427. Xinstead of a text one, include the -X switch just as one would do to
  1428. Xbring up an X window. The expected graphic chart will be displayed on
  1429. Xthe screen unless the -Xb write bitmap to file switch is in effect.
  1430. XThe colors chosen for the graphics are basically identical to those
  1431. Xchosen in X window charts, and both of these in turn are now based on
  1432. Xthe Ansi colors used in the Ansi text charts.
  1433. X
  1434. X     Now, there are many various types of PC monitors and
  1435. Xresolutions. Astrolog will automatically try to determine and pick
  1436. Xthe highest resolution mode available on your system, so this need
  1437. Xnot be worried about.
  1438. X
  1439. X     The PC Astrolog charts may be animated in all the various ways,
  1440. Xand the animation will usually be flicker free! Now, PC's do have
  1441. Xlimited memory, therefore there might not be room for more than one
  1442. Xpage of graphics at the highest resolution. Hence, animation at the
  1443. Xhighest (default) mode, may flicker; however, graphics at a slightly
  1444. Xlower resolution may take enough less memory to allow enough to do
  1445. Xflicker free animation. A special PC only feature for this has been
  1446. Xadded: Pressing the 'tab' key while the PC graphics are up will try
  1447. Xto pick a lower resolution, where flicker free animation can be done.
  1448. XSpecifically, we'll toggle to a 640x350 EGA mode. On my own system,
  1449. Xthe highest resolution I get is a 640x480 16 color VGA mode, however
  1450. Xthe charts can't be animated without flicker. When I hit 'tab', I
  1451. Xdrop from 480 lines of graphics to 350, but now the animation will be
  1452. Xperfectly smooth. The results with whatever graphics system you have
  1453. Xmay be different.
  1454. X
  1455. X     The chart that comes up will use as many pixels as is defined by
  1456. Xthe chart's size as specified with the -Xw and -Xs switches. The 'Q'
  1457. Xchange chart size to square key works just as before. However, on PC
  1458. Xscreens we will try to take in account the pixel size ratio. On EGA
  1459. Xscreens where the pixels are long and narrow, meaning a true "square"
  1460. Xchart looks tall and thin, we compensate by increasing the horizontal
  1461. Xsize of the chart. The 'B' key, which on X window graphics will blast
  1462. Xthe current window contents to the root background, is a meaningless
  1463. Xfeature for a PC. This key, for PC graphics systems, will instead
  1464. Xresize the chart to be the full size of the screen. When the graphics
  1465. Xmode is changed through 'tab', the chart size will be modified to be
  1466. Xthe largest "square" that will fit on the screen (as if the computer
  1467. Xpresses 'B' followed by 'Q' for you.)
  1468. X
  1469. X     If the size of the chart is less than the size of the screen, it
  1470. Xwill be displayed centered in the middle of the screen. If however
  1471. Xthe chart size is greater than the screen size, then the chart will
  1472. Xtake up the whole screen, and part of it will be clipped. By default
  1473. Xwe show the upper left corner of the chart if this is the case. Now,
  1474. Xone can define and change which part of the chart gets shown. On PC's
  1475. Xthe meaning of pressing the number keys have been enhanced. Normally,
  1476. Xnumber keys set the animation speed; they still do, but now only when
  1477. Xanimation is actually being done. If not in animation, the number
  1478. Xkeys from 1..9 will define which "quadrant" or area of the chart gets
  1479. Xshown. It's best to think of and use the number pad for this feature
  1480. X(make sure num lock is on!) Pressing the '7' key, i.e. the upper left
  1481. Xnumber on the number pad, will set it so the default upper left part
  1482. Xof the chart is seen. Pressing the '3' key, on the lower right corner
  1483. Xof the pad, will show the lower right corner of charts larger than
  1484. Xthe screen size. Pressing '5' will show the middle area of the chart,
  1485. Xwith equal amounts of the chart clipped from left and right, and top
  1486. Xand bottom. Pressing '6' will show the right end of the chart,
  1487. Xvertically centered on the screen, and so on. Basically, we have a
  1488. Xsimple implementation of something like scroll bars, allowing viewing
  1489. Xof all parts of the "window"! One can generate and display on the
  1490. Xscreen even the largest charts producible with Astrolog. (Bitmap
  1491. Xfiles are still limited to, i.e. will be clipped to, a maximum size
  1492. Xof 728x720 pixels, however). Even on an 640x350 EGA, one can use this
  1493. Xto generate and view all parts of a 300% scaled relationship aspect
  1494. Xgrid (883x883), or even a 300% scaled world map display (1082x545)!
  1495. X
  1496. X--
  1497. X
  1498. X#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#
  1499. X+     Walter D. "Cruiser1" Pullen    |    astrolog@byron.u.washington.edu     +
  1500. X#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#
  1501. END_OF_FILE
  1502. if test 29711 -ne `wc -c <'Helpfile.p3'`; then
  1503.     echo shar: \"'Helpfile.p3'\" unpacked with wrong size!
  1504. fi
  1505. # end of 'Helpfile.p3'
  1506. fi
  1507. echo shar: End of archive 7 \(of 12\).
  1508. cp /dev/null ark7isdone
  1509. MISSING=""
  1510. for I in 1 2 3 4 5 6 7 8 9 10 11 12 ; do
  1511.     if test ! -f ark${I}isdone ; then
  1512.     MISSING="${MISSING} ${I}"
  1513.     fi
  1514. done
  1515. if test "${MISSING}" = "" ; then
  1516.     echo You have unpacked all 12 archives.
  1517.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1518. else
  1519.     echo You still need to unpack the following archives:
  1520.     echo "        " ${MISSING}
  1521. fi
  1522. ##  End of shell archive.
  1523. exit 0
  1524.  
  1525. exit 0 # Just in case...
  1526.