Author: DavidCzech
Date: 2008-02-26 16:52:43 -0500 (Tue, 26 Feb 2008)
New Revision: 997

Modified:
   trunk/pysoy/src/scenes/Planar.pxi
Log:
Centered Plane

Modified: trunk/pysoy/src/scenes/Planar.pxi
===================================================================
--- trunk/pysoy/src/scenes/Planar.pxi   2008-02-26 21:41:19 UTC (rev 996)
+++ trunk/pysoy/src/scenes/Planar.pxi   2008-02-26 21:52:43 UTC (rev 997)
@@ -20,6 +20,8 @@
 DEF GeomBody = 2
 DEF GeomField = 4
 DEF GeomLight = 8
+import math
+
 cdef Vert midpoint(Vert a,Vert b):
   X = 0.5*(a.px+b.px)
   Y = 0.5*(a.py+b.py)
@@ -29,6 +31,8 @@
   res.py=Y
   res.pz=Z
   return res
+
+
 cdef class Planar (Scene) :
   ''' Planar Scene
 
@@ -41,16 +45,16 @@
     ode.dGeomSetCategoryBits(self._planeID,GeomScene)
     ode.dGeomSetData(self._planeID, <void*> self)
     cdef Vert _a, _b, _c, _d, _e, _f
-    SIZE = 200
-    self._verts[0].px =  SIZE ## A Big Triangle 
+    SIZE = 100
+    self._verts[0].px =  0.0 ## A Big Triangle 
     self._verts[0].py =  0.0
-    self._verts[0].pz = -SIZE
-    self._verts[1].px =  0.0
+    self._verts[0].pz = SIZE + (math.sin(60)*SIZE)/2
+    self._verts[1].px =  math.cos(60)*SIZE
     self._verts[1].py =  0.0
-    self._verts[1].pz =  SIZE
-    self._verts[2].px = -SIZE
+    self._verts[1].pz =  math.sin(60)*SIZE + (math.sin(60)*SIZE)/2
+    self._verts[2].px = -math.cos(60)*SIZE
     self._verts[2].py =  0.0
-    self._verts[2].pz = -SIZE
+    self._verts[2].pz =  math.sin(60)*SIZE + (math.sin(60)*SIZE)/2
     self._faces[0].a  =  0
     self._faces[0].b  =  2
     self._faces[0].c  =  1

_______________________________________________
PySoy-SVN mailing list
PySoy-SVN@pysoy.org
http://www.pysoy.org/mailman/listinfo/pysoy-svn

Reply via email to