Exemple #1
0
        /// <summary>
        /// Hyperbolic Orbit
        /// </summary>
        /// <param name="comet"></param>
        private void GetOrbitHyper(Comet comet)
        {
            int idx1, idx2;

            idx1 = idx2 = this.Division / 2;
            double t    = Math.Sqrt(comet.e * comet.e - 1.0);
            double axis = comet.q / (comet.e - 1.0);
            double dF   = UdMath.arccosh((MAXORBIT + axis) / (axis * comet.e)) / (this.Division / 2);

            double F = 0.0;

            for (int i = 0; i <= (this.Division / 2); i++, F += dF)
            {
                double RCosV = axis * (comet.e - UdMath.cosh(F));
                double RSinV = axis * t * UdMath.sinh(F);
                Orbit[idx1++] = new Xyz(RCosV, RSinV, 0.0);
                Orbit[idx2--] = new Xyz(RCosV, -RSinV, 0.0);
            }
        }