added files. still not consistently getting better numbers

This commit is contained in:
Stephen Mardson McQuay
2010-03-18 23:32:24 -06:00
parent b33159f8a9
commit 9836fdcbfe
7 changed files with 313 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
from Blender import *
import bpy
import math
phiaa = -19.471220333
r = 1.0
phia = math.pi * phiaa / 180.0
the120 = math.pi * 120.0 / 180.0
v = [[0,0,0], [0,0,0], [0,0,0], [0,0,0]]
v[0][0] = 0.0
v[0][1] = 0.0
v[0][2] = r
the = 0.0
for i in range(1,4):
v[i][0] = r * math.cos(the) * math.cos(phia)
v[i][1] = r * math.sin(the) * math.cos(phia)
v[i][2] = r * math.sin(phia)
the = the + the120
print v
# map vertices to 4 faces
f = []
f.append([0, 1, 2])
f.append([0, 2, 3])
f.append([0, 3, 1])
f.append([1, 2, 3])
me = bpy.data.meshes.new('points')
me.verts.extend([i for i in v])
me.faces.extend([i for i in f])
scn = bpy.data.scenes.active
ob = scn.objects.new(me, 'points_obj')
+12
View File
@@ -0,0 +1,12 @@
from Blender import *
import bpy
from grid.test3d import simple_rect_grid
g = simple_rect_grid(10, 10, 20)
me = bpy.data.meshes.new('points')
me.verts.extend(g.points)
# me.faces.extend([i.verts for i in p.faces.itervalues()])
scn = bpy.data.scenes.active
ob = scn.objects.new(me, 'points_obj')