public Spherical ( float r, float theta, float phi ) : |
||
r | float | |
theta | float | |
phi | float | |
리턴 |
public Point3[,] SphereCoordinates() { Point3[,] pts = new Point3[30, 20]; var m = new Matrix3 (); var mt = Matrix3.Translate3 (xc, yc, zc); for (int i = 0; i < pts.GetLength(0); i++) { for (int j = 0; j < pts.GetLength(1); j++) { pts[i, j] = m.Spherical(r, i * 180 / (pts.GetLength(0) - 1), j * 360 / (pts.GetLength(1) - 1)); pts[i, j].Transform(mt); } } return pts; }
public Point3[,] SphereCoordinates() { Point3[,] pts = new Point3[30, 20]; var m = new Matrix3(); var mt = Matrix3.Translate3(xc, yc, zc); for (int i = 0; i < pts.GetLength(0); i++) { for (int j = 0; j < pts.GetLength(1); j++) { pts[i, j] = m.Spherical(r, i * 180 / (pts.GetLength(0) - 1), j * 360 / (pts.GetLength(1) - 1)); pts[i, j].Transform(mt); } } return(pts); }