Exemplo n.º 1
0
 public Point3[] CircleCoordinates(float y)
 {
     Point3[] pts = new Point3[30];
     var m = new Matrix3 ();
     for (int i = 0; i < pts.Length; i++)
         pts [i] = m.Cylindrical (r, i * 360 / (pts.Length - 1), y);
     return pts;
 }
Exemplo n.º 2
0
 public Point3 Cylindrical(float r, float theta, float y)
 {
     var pt = new Point3 ();
     var sn = (float)Math.Sin(theta * Math.PI / 180);
     var cn = (float)Math.Cos(theta * Math.PI / 180);
     pt.X = r * cn;
     pt.Y = y;
     pt.Z = -r * sn;
     pt.W = 1;
     return pt;
 }