Exemple #1
0
        public Point3D AnimateStar(double sx,double sy,double sz, double rx, double ry,
            double rz,double elevation,double azimuth)
        {
            Point3D result = new Point3D(0, 0, 0);
            
            Point3[] pts = new Point3[1];

            pts[0] = new Point3(sx, sy, sz, 1);

            Matrix3 r3 = Matrix3.Rotate3Z(rz);

            pts[0].Transform(r3);

            Matrix3 r1 = Matrix3.Rotate3X(rx);

            pts[0].Transform(r1);

            Matrix3 r2 = Matrix3.Rotate3Y(ry);

            pts[0].Transform(r2);

            Matrix3 m = Matrix3.AzimuthElevation(elevation, azimuth, 0);
            pts[0].Transform(m);
 
            result = new Point3D(pts[0].X, pts[0].Y, pts[0].Z);
            return result;
        }
Exemple #2
0
        public Point DrawStar(double sx,double sy,double sz)
        {
            Point result=new Point(0,0);

            Point3[] pts = new Point3 [1];

            pts[0]= new Point3(sx,sy,sz,1);

            Matrix3 m = Matrix3.AzimuthElevation(0,30,0);

            pts[0].Transform(m);
            
            result = Point2D(new Point(pts[0].X, pts[0].Y));

            return result;
        }
Exemple #3
0
        public Point DrawPoint(Point3 convertPoint)
        {
            var result = new Point();

            return result;
        }
Exemple #4
0
        public Point3 Spherical(double r, double theta, double phi)
        {
            var pt = new Point3();

            var snt = Math.Sin(theta*Math.PI/180);
            var cnt = Math.Cos(theta*Math.PI/180);

            var snp = Math.Sin(phi*Math.PI/180);
            var cnp = Math.Cos(phi*Math.PI/180);

            pt.X = r*snt*cnp;
            pt.Y = r*cnt;
            pt.Z = -r*snt*cnp;
            pt.W = 1;

            return pt;
        }
Exemple #5
0
        public Point3 Cylindrical(double r, double theta, double y)
        {
            var pt = new Point3();

            var sn = Math.Sin(theta*Math.PI/180);
            var cn = Math.Cos(theta*Math.PI/180);

            pt.X = r*cn;
            pt.Y = y;
            pt.Z = -r*sn;
            pt.W = 1;

            return pt;
        }
Exemple #6
0
        public Point3[] CubePoints()
        {

            double a = 200;

            Point3[] pts = new Point3[8];

            pts[0] = new Point3(0, 0, 0, 0);
            pts[1] = new Point3(a, 0, 0, 0);
            pts[2] = new Point3(a, a, 0, 0);
            pts[3] = new Point3(0, a, 0, 0);
            pts[4] = new Point3(0, 0, a, 1);
            pts[5] = new Point3(a, 0, a, 1);
            pts[6] = new Point3(a, a, a, 1);
            pts[7] = new Point3(0, a, a, 1);
           

            return pts;
        }