示例#1
0
        // get angle from 2 points 3D and a plane XOY, YOZ, XOZ
        public static double getAngle(Point3D A, Point3D B, Constants.planeType _type)
        {
            Line3D  line  = new Line3D(A, B);
            Plane3D plane = new Plane3D(_type);

            return((180 / 3.14) * Math.Asin((Math.Abs(plane.getA() * line.getL() + plane.getB() * line.getM() + plane.getC() * line.getN()))
                                            / (Math.Sqrt(line.getL() * line.getL() + line.getM() * line.getM() + line.getN() * line.getN()) * Math.Sqrt(plane.getA() * plane.getA() + plane.getB() * plane.getB() + plane.getC() * plane.getC()))));
        }
示例#2
0
        // get angle from 2 points 3D and a plane XOY, YOZ, XOZ
        public static double getAngle(Point3D A, Point3D B, Constants.planeType _type)
        {
            Line3D line = new Line3D(A, B);
            Plane3D plane = new Plane3D(_type);

            return (180 / 3.14) * Math.Asin((Math.Abs(plane.getA() * line.getL() + plane.getB() * line.getM() + plane.getC() * line.getN()))
                    / (Math.Sqrt(line.getL() * line.getL() + line.getM() * line.getM() + line.getN() * line.getN()) * Math.Sqrt(plane.getA() * plane.getA() + plane.getB() * plane.getB() + plane.getC() * plane.getC())));
        }