Normand Briere
2019-09-02 21ac57b36a9e3b909853c7d64ac29b7ad72490a3
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();
....@@ -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 }