Example #1
0
        // true -> positive orientation
        // false -> negative orientation
        bool CalculateTriangleOrientation(
            CartesianCoords a1, CartesianCoords a2, CartesianCoords a3)
        {
            //(A1.x - A3.x) * (A2.y - A3.y) - (A1.y - A3.y) * (A2.x - A3.x)
            var orientation =
                (a1.X - a3.X) * (a2.Y - a3.Y) - (a1.Y - a3.Y) * (a2.X - a3.X);

            return(orientation > 0);
        }
Example #2
0
        public Astrobody(AstrobodyConstants constants)
        {
            this.constants       = constants;
            this.orbitalElements = new OrbitalElements();

            this.eclipticCartLocal = new CartesianCoords();
            this.eclipticCartHelio = new CartesianCoords();
            this.eclipticCartGeo   = new CartesianCoords();

            this.equatorialCartGeo = new CartesianCoords();

            this.ecliptic   = new EclipticCoords();
            this.equatorial = new EquatorialCoords();
        }