MCPcopy Create free account
hub / github.com/CruiserOne/Astrolog / WireChartOrbit

Function WireChartOrbit

xdevice.cpp:2389–2609  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2387// in the middle. Like XChartOrbit() except for 3D wireframe format.
2388
2389void WireChartOrbit()
2390{
2391 int x[objMax], y[objMax], z[objMax], zWin, xd, yd, i, j, k;
2392 real sx, sz, xp, yp, zp, xp2, yp2, zp2, rT;
2393#ifdef SWISS
2394 ES es, *pes1, *pes2;
2395 int xT, yT, zT, x2, y2, z2;
2396#endif
2397 PT3R vCross, ptCen;
2398 real tilt, rot;
2399
2400 // Compute coordinates of planets.
2401 i = gi.nScale/gi.nScaleT;
2402 sz = gs.rspace > 0.0 ? gs.rspace : (i <= 1 ? 90.0 : (i == 2 ? 30.0 :
2403 (i == 3 ? 6.0 : (gi.nScaleText/2 <= 1 ? 1.0 : 0.006))));
2404 zWin = Min(gs.xWin, gs.yWin);
2405 sx = (real)zWin/sz;
2406 for (i = 0; i <= is.nObj; i++) if (FProper(i)) {
2407 xp = space[i].x; yp = space[i].y; zp = space[i].z;
2408 if (us.fStar || gs.fAllStar) {
2409 xp /= rLYToAU; yp /= rLYToAU; zp /= rLYToAU;
2410 }
2411 if (us.fHouse3D)
2412 OrbitPlot(&xp, &yp, &zp, sz, i, space);
2413 x[i] = -(int)(xp*sx); y[i] = (int)(yp*sx); z[i] = (int)(zp*sx);
2414 }
2415
2416 // Draw zodiac lines.
2417 if (!gs.fHouseExtra) {
2418 k = zWin;
2419 if (!gs.fColorSign)
2420 DrawColor(kLtGrayB);
2421 for (i = 0; i < cSign; i++) {
2422 j = i+1;
2423 if (gs.fColorSign)
2424 DrawColor(kSignB(j));
2425 xd = NCosD(k, nDegHalf-i*30); yd = NSinD(k, nDegHalf-i*30);
2426 WireLine(0, 0, 0, xd, yd, 0);
2427 xd = NCosD(k, nDegHalf-i*30-15); yd = NSinD(k, nDegHalf-i*30-15);
2428 DrawSign(j, xd, yd);
2429 }
2430 }
2431
2432 // Draw lines connecting planets which have aspects between them.
2433 if (gs.fEquator && us.nAsp > 0) {
2434 if (!FCreateGrid(fFalse))
2435 return;
2436 for (j = oNorm; j >= 1; j--)
2437 for (i = j-1; i >= 0; i--)
2438 if (grid->n[i][j] && FProper(i) && FProper(j)) {
2439 DrawColor(kAspB[grid->n[i][j]]);
2440 WireLine(x[i], y[i], z[i], x[j], y[j], z[j]);
2441 if (gs.fLabelAsp) {
2442 gi.zDefault = (z[i] + z[j]) >> 1;
2443 DrawAspect2(grid->n[i][j],
2444 (x[i] + x[j]) >> 1, (y[i] + y[j]) >> 1, i, j);
2445 }
2446 }

Callers 1

DrawChartXFunction · 0.85

Calls 15

FProperFunction · 0.85
OrbitPlotFunction · 0.85
DrawColorFunction · 0.85
WireLineFunction · 0.85
DrawSignFunction · 0.85
FCreateGridFunction · 0.85
RObjDiamFunction · 0.85
WireOctahedronFunction · 0.85
WireSphereFunction · 0.85
WireCircleFunction · 0.85
DrawObjectFunction · 0.85
OrbitRecordFunction · 0.85

Tested by

no test coverage detected