| 1827 | // Draw a grid of triangles or squares over the surface of the planet. |
| 1828 | |
| 1829 | void DrawMapTriangles(flag fGlobe, int nScl, CIRC *pcr, real deg) |
| 1830 | { |
| 1831 | real x1, y1; |
| 1832 | int i; |
| 1833 | |
| 1834 | if (gs.nTriangles > 0) { |
| 1835 | DrawColor(kCyanB); |
| 1836 | y1 = RAsinD(1.0/(rPhi*2.0-1.0)); // Icosahedron constant. |
| 1837 | i = gs.nTriangles - 1; |
| 1838 | for (x1 = 0.0; x1 < rDegMax; x1 += 72.0) { |
| 1839 | DrawMapTriangle(x1, y1, x1+72.0, y1, x1+36.0, 90.0, |
| 1840 | fGlobe, nScl, pcr, deg, i, 5); |
| 1841 | DrawMapTriangle(x1, y1, x1+72.0, y1, x1+36.0, -y1, |
| 1842 | fGlobe, nScl, pcr, deg, i, 4); |
| 1843 | DrawMapTriangle(x1+36.0, -y1, x1+108.0, -y1, x1+72, -90.0, |
| 1844 | fGlobe, nScl, pcr, deg, i, 5); |
| 1845 | DrawMapTriangle(x1+36.0, -y1, x1+108.0, -y1, x1+72, y1, |
| 1846 | fGlobe, nScl, pcr, deg, i, 4); |
| 1847 | } |
| 1848 | } else if (gs.nTriangles < 0) { |
| 1849 | DrawColor(kRedB); |
| 1850 | y1 = RAsinD(1.0/rSqr3); // Cube constant. |
| 1851 | i = -gs.nTriangles - 1; |
| 1852 | for (x1 = 0.0; x1 < rDegMax; x1 += rDegQuad) |
| 1853 | DrawMapSquare(x1, y1, x1, -y1, x1+90.0, -y1, x1+90.0, y1, |
| 1854 | fGlobe, nScl, pcr, deg, i, 11); |
| 1855 | for (x1 = -y1; x1 <= y1; x1 += y1*2.0) |
| 1856 | DrawMapSquare(0.0, x1, 90.0, x1, 180.0, x1, 270.0, x1, |
| 1857 | fGlobe, nScl, pcr, deg, i, 0); |
| 1858 | } |
| 1859 | } |
| 1860 | |
| 1861 | |
| 1862 | // This major routine draws all of Astrolog's map charts. This means either |
no test coverage detected