public HyperbolicParaboloid(Material mf, Material mb, String fName, int nx, int ny) : base(mf, mb) { hpi = new HyperbolicParaboloidInfo(fName); this.nx = nx; this.ny = ny; PlaneMap pm = new PlaneMap(ROWS, COLUMNS); Triangulation(pm); }
public HyperbolicParaboloid(Material mf, Material mb, double a, double b, double x_left, double x_right, double y_left, double y_right, int nx, int ny) : base(mf, mb) { hpi = new HyperbolicParaboloidInfo(a, b, x_left, x_right, y_left, y_right); this.nx = nx; this.ny = ny; PlaneMap pm = new PlaneMap(ROWS, COLUMNS); Triangulation(pm); }
private void Triangulation(PlaneMap pm) { Point3D[,] dots = GetPartition(); for (int i = 0; i < nx - 1; ++i) { for (int j = 0; j < ny - 1; ++j) { this.AddPolygons(pm.Stretch(dots[i + 1, j + 1], dots[i + 1, j], dots[i, j], dots[i, j + 1])); } } }