added screenshots

This commit is contained in:
FelixBrendel
2017-10-20 10:16:53 +02:00
parent ee5b948ef5
commit a713ffd508
6 changed files with 6 additions and 5 deletions
+6 -5
View File
@@ -2,6 +2,7 @@ import bpy
import random import random
print("- - "*20) print("- - "*20)
random.seed(27051996)
def generateIcoSphere(): def generateIcoSphere():
@@ -50,18 +51,18 @@ def generateIcoSphere():
) )
return (verts, faces) return (verts, faces)
def createMeshFromData(name, origin, verts, faces): def createMeshFromData(name, origin, scale, verts, faces):
# Create mesh and object # Create mesh and object
me = bpy.data.meshes.new(name+'Mesh') me = bpy.data.meshes.new(name+'Mesh')
ob = bpy.data.objects.new(name, me) ob = bpy.data.objects.new(name, me)
ob.location = origin ob.location = origin
ob.scale = (8,8,8) ob.scale = scale
# Link object to scene and make active # Link object to scene and make active
scn = bpy.context.scene scn = bpy.context.scene
scn.objects.link(ob) scn.objects.link(ob)
scn.objects.active = ob scn.objects.active = ob
ob.select = False # ob.select = False
# Create mesh from given verts, faces. # Create mesh from given verts, faces.
me.from_pydata(verts, [], faces) me.from_pydata(verts, [], faces)
@@ -147,8 +148,8 @@ def subdivide(verts, faces, iteration):
verts, faces = generateIcoSphere() verts, faces = generateIcoSphere()
for i in range(5): for i in range(10):
verts, faces = subdivide(verts, faces, i+1) verts, faces = subdivide(verts, faces, i+1)
createMeshFromData('ProcGenSphere', (0,0,0), verts, faces) createMeshFromData('ProcGenSphere', (0,0,0), (8,8,8), verts, faces)
Binary file not shown.

After

Width:  |  Height:  |  Size: 873 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 843 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

BIN
View File
Binary file not shown.