summaryrefslogtreecommitdiff
path: root/make.py
diff options
context:
space:
mode:
authorAnthony LaTorre <tlatorre9@gmail.com>2011-09-06 17:18:14 -0400
committerAnthony LaTorre <tlatorre9@gmail.com>2011-09-06 17:18:14 -0400
commit86cb5f26029b3357727b88fee3fa7dd799a8d6c8 (patch)
treefc915556ef813cf4ad59edeb7b59fee0e3244c34 /make.py
parent3d3140071713e523516793258e3c904ca162d7b7 (diff)
downloadchroma-86cb5f26029b3357727b88fee3fa7dd799a8d6c8.tar.gz
chroma-86cb5f26029b3357727b88fee3fa7dd799a8d6c8.tar.bz2
chroma-86cb5f26029b3357727b88fee3fa7dd799a8d6c8.zip
geometry on the GPU is now a struct created in the GPUGeometry class. coding style for cuda code is now compliant with python PEP 7 -- Style Guide for C Code.
Diffstat (limited to 'make.py')
-rw-r--r--make.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/make.py b/make.py
index 523b10f..fa66c4d 100644
--- a/make.py
+++ b/make.py
@@ -72,12 +72,12 @@ def box(dx, dy, dz, center=(0,0,0)):
"Return a box with linear dimensions `dx`, `dy`, and `dz`."
return linear_extrude([-dx/2.0,dx/2.0,dx/2.0,-dx/2.0],[-dy/2.0,-dy/2.0,dy/2.0,dy/2.0],height=dz,center=center)
-def cube(size=1, height=None):
+def cube(size=1, height=None, center=(0,0,0)):
"Return a cube mesh whose sides have length `size`."
if height is None:
height = size
- return linear_extrude([-size/2.0,size/2.0,size/2.0,-size/2.0],[-size/2.0,-size/2.0,size/2.0,size/2.0], height=size)
+ return linear_extrude([-size/2.0,size/2.0,size/2.0,-size/2.0],[-size/2.0,-size/2.0,size/2.0,size/2.0], height=size, center=center)
def cylinder(radius=1, height=2, radius2=None, nsteps=64):
"""