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

Function WireCircle

xdevice.cpp:1940–1959  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1938// rotated in any configuration. Used when drawing rings of planets.
1939
1940void WireCircle(int x, int y, int z, real r, real tilt, real rot)
1941{
1942 int m, n, o, u, v, w, i, di;
1943 real alt, azi;
1944
1945 i = NAbs((int)r) << 1;
1946 di = 2 + (i < 90) + (i < 72) + (i < 60) + (i < 40);
1947 for (i = 0; i <= nDegMax; i += di) {
1948 azi = (real)i; alt = 0.0;
1949 if (tilt != 0.0)
1950 CoorXform(&azi, &alt, tilt);
1951 azi += rot;
1952 u = x + (int)(r * RCosD(alt) * RSinD(azi));
1953 v = y + (int)(r * RCosD(alt) * RCosD(azi));
1954 w = z + (int)(r * RSinD(alt));
1955 if (i > 0)
1956 WireLine(m, n, o, u, v, w);
1957 m = u; n = v; o = w;
1958 }
1959}
1960
1961
1962// Add an octahedron of a given radius to the current wireframe file. These

Callers 1

WireChartOrbitFunction · 0.85

Calls 2

CoorXformFunction · 0.85
WireLineFunction · 0.85

Tested by

no test coverage detected