示例#1
0
        //-------------------------------------------------------------
        public static new double GetDistanceBetweenPoints(Point A1, Point A2)
        {
            DescartesSystem P1 = (DescartesSystem)A1;
            DescartesSystem P2 = (DescartesSystem)A2;

            return(Math.Sqrt(Math.Pow(P2.x - P1.x, 2) + Math.Pow(P2.y - P1.y, 2) + Math.Pow(P2.z - P1.z, 2)));
        }
        //-------------------------------------------------------------
        public static new double GetDistanceBetweenPoints(Point A1, Point A2)
        {
            DescartesSystem P1 = ((СylindricalSystem)A1).ConvertCylindricalToDescarte();
            DescartesSystem P2 = ((СylindricalSystem)A2).ConvertCylindricalToDescarte();

            return(DescartesSystem.GetDistanceBetweenPoints(P1, P2));
        }
示例#3
0
        //-------------------------------------------------------------
        public override Point AddRadiusVectors(Point radiusVector)
        {
            DescartesSystem thisObject = this.ConvertSphericalToDescarte();
            DescartesSystem descarte   = (DescartesSystem)(thisObject.AddRadiusVectors(radiusVector));

            SphericalSystem spherical = descarte.ConvertDescarteToSpherical();

            return(new SphericalSystem(spherical.ro, spherical.thetta, spherical.gamma));
        }
示例#4
0
        //-------------------------------------------------------------
        public static new double GetAngleBetweenRadiusVectors(Point startVec1, Point endVec1, Point startVec2, Point endVec2)
        {
            DescartesSystem startVector1 = ((SphericalSystem)startVec1).ConvertSphericalToDescarte();
            DescartesSystem startVector2 = ((SphericalSystem)startVec2).ConvertSphericalToDescarte();
            DescartesSystem endVector1   = ((SphericalSystem)endVec1).ConvertSphericalToDescarte();
            DescartesSystem endVector2   = ((SphericalSystem)endVec2).ConvertSphericalToDescarte();

            return(DescartesSystem.GetAngleBetweenRadiusVectors(startVector1, startVector2, endVector1, endVector2));
        }
        //-------------------------------------------------------------
        public override Point AddRadiusVectors(Point radiusVector)
        {
            DescartesSystem thisObject = this.ConvertCylindricalToDescarte();
            DescartesSystem descarte   = (DescartesSystem)(thisObject.AddRadiusVectors(radiusVector));

            СylindricalSystem cylindrical = descarte.ConvertDescarteToCylindrical();


            return(new СylindricalSystem(cylindrical.cylindricalRo, cylindrical.cylindricalGamma, cylindrical.cylindricalZ));
        }
示例#6
0
        //-------------------------------------------------------------
        public override Point AddRadiusVectors(Point radiusVector)
        {
            DescartesSystem vector   = (DescartesSystem)radiusVector;
            DescartesSystem tempThis = (DescartesSystem)this;

            double x = tempThis.x + vector.x;
            double y = tempThis.y + vector.y;
            double z = tempThis.z + vector.z;

            return(new DescartesSystem(x, y, z));
        }
示例#7
0
        //-------------------------------------------------------------
        public static new double GetAngleBetweenRadiusVectors(Point startVec1, Point endVec1, Point startVec2, Point endVec2)
        {
            DescartesSystem startVector1 = (DescartesSystem)startVec1;
            DescartesSystem endVector1   = (DescartesSystem)endVec1;
            DescartesSystem startVector2 = (DescartesSystem)startVec2;
            DescartesSystem endVector2   = (DescartesSystem)endVec2;

            double numerator   = startVector1.x * startVector2.x + startVector1.y * startVector2.y + startVector1.z * startVector2.z;
            double denomerator = Math.Sqrt(Math.Pow(startVector1.x, 2) + Math.Pow(startVector1.y, 2) + Math.Pow(startVector1.z, 2)) * Math.Sqrt(Math.Pow(startVector2.x, 2) + Math.Pow(startVector2.y, 2) + Math.Pow(startVector2.z, 2));

            return(numerator / denomerator);
        }
        //-------------------------------------------------------------
        public override double GetVectorRadius()
        {
            DescartesSystem descarte = this.ConvertCylindricalToDescarte();

            return(descarte.GetVectorRadius());
        }