Normand Briere
2019-09-18 f9325048496d7cdbcad233f8a6b84c88e79adcc2
Grid.java
....@@ -4,6 +4,11 @@
44
55 Grid()
66 {
7
+ this(36, 36);
8
+ }
9
+
10
+ Grid(int u, int v)
11
+ {
712 super(false);
813 //this(true);
914 //}
....@@ -12,8 +17,8 @@
1217 //{
1318 inPnt = new cVector();
1419 name = "Grid";
15
- uDivs = 35;
16
- vDivs = 34;
20
+ uDivs = u;
21
+ vDivs = v;
1722 minUDivs = 1;
1823 minVDivs = 1;
1924 center = new cVector();
....@@ -32,9 +37,9 @@
3237 return e;
3338 }
3439
35
- protected void deepCopySelf(Object3D other)
40
+ protected void deepCopyNode(Object3D other)
3641 {
37
- super.deepCopySelf(other);
42
+ super.deepCopyNode(other);
3843 Grid e = (Grid)other;
3944 e.center = new cVector();
4045 LA.vecCopy(center, e.center);
....@@ -57,9 +62,19 @@
5762 */
5863 }
5964
65
+ double uStretch()
66
+ {
67
+ return 1;
68
+ }
69
+
70
+ double vFlip(double v)
71
+ {
72
+ return 1-v;
73
+ }
74
+
6075 Vertex biparamFunction(double u, double v)
6176 {
62
- Vertex temp = new Vertex((2*v-1)*radius*8, 0 /*-radius,*/, (2*u-1)*radius*8);
77
+ Vertex temp = new Vertex((2*v-1)*radius*4, 0 /*-radius,*/, (2*u-1)*radius*4);
6378 temp.norm = LA.newVector(0,1,0);
6479 return temp;
6580 }