Commits

Anonymous committed 499ce46

Added texturing and blending demos.

  • Participants
  • Parent commits 9ac386d

Comments (0)

Files changed (16)

File opengl/python/a2/enemy.py

+from OpenGL.GL import *
+from OpenGL.GLU import *
+from OpenGL.GLUT import *
+
+import Image
+import math
+
+def load_image_and_bind(name):
+	im = Image.open(name).transpose(Image.FLIP_TOP_BOTTOM)
+	img_data = im.tostring()
+	img_size = im.size
+
+	glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, img_size[0], img_size[1], 0, GL_RGBA, GL_UNSIGNED_BYTE, img_data)
+	glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST)
+	glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST)
+
+class Enemy(object):
+	def __init__(self):
+		""" Loads the enemy texture """
+		self.tex = glGenTextures(1)
+		glBindTexture(GL_TEXTURE_2D, self.tex)
+		load_image_and_bind("figure.png")
+
+		self.pos = (0,0,0)
+		self.angle = 0
+	
+	def set_pos(self, x, y, z):
+		self.pos = x,y,z
+	
+	def set_heading(self, hx, hz):
+		# calculate rotation angle
+		self.angle = math.degrees(math.atan2(hx,hz))
+
+	def draw(self):
+		glPushAttrib(GL_CURRENT_BIT)
+		glEnable(GL_TEXTURE_2D)
+		glDisable(GL_LIGHTING)
+		glBindTexture(GL_TEXTURE_2D, self.tex)
+
+		glTranslatef(self.pos[0],self.pos[1],self.pos[2])
+		glRotatef(self.angle,0,1,0)
+
+		h = 10
+		w = h/4.
+
+		glBegin(GL_QUADS)
+		glTexCoord2f(0,0)
+		glVertex3f(-w,0,0)
+		glTexCoord2f(1,0)
+		glVertex3f(w,0,0)
+		glTexCoord2f(1,1)
+		glVertex3f(w,h,0)
+		glTexCoord2f(0,1)
+		glVertex3f(-w,h,0)
+		glEnd()
+
+		glDisable(GL_TEXTURE_2D)
+		glPopAttrib()
+
+
+

File opengl/python/a2/figure.png

Added
New image

File opengl/python/a2/first_person.py

 from OpenGL.GLUT import *
 import math
 
+from enemy import Enemy
 from complex import Complex
 
 MS_PER_FRAME = 10
 
 complex = None
 character = None
+enemy = None
 
 def setup_scene():
-	global complex, character
+	global complex, character, enemy
 	complex = Complex()
 	character = Character()
 	character.set_pos(complex.starting_position)
+	enemy = Enemy()
+	enemy.set_pos(character.pos[0], character.pos[1], character.pos[2])
+
+
+def update_scene():
+	global character
+	h = [character.pos[i]-enemy.pos[i] for i in [0,1,2]]
+	enemy.set_heading(h[0],h[2])
 
 def draw_axis():
 	glBegin(GL_LINES)
 	# draw the complex
 	complex.draw()
 
+	enemy.draw()
+
 	glFlush()
 
 def init():
 	glClearColor(0,0,0,0)
 	glEnable(GL_DEPTH_TEST)
+	glEnable(GL_BLEND)
+	glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
 
 	glEnable(GL_LIGHTING)
 	glEnable(GL_LIGHT0)
 
 def timer(i):
 	global millis
-	millis += MS_PER_FRAME
+	millis += MS_PER_FRAME	
+	update_scene()
 	glutPostRedisplay()
 	glutTimerFunc(MS_PER_FRAME,timer,0)
 

File opengl/python/l18/checks.png

Added
New image

File opengl/python/l18/filtering.py

+#
+# Demonstrates the different filtering techniques.
+# BP 21.09.2010
+#
+
+from OpenGL.GL import *
+from OpenGL.GLU import *
+from OpenGL.GLUT import *
+
+from PIL import Image
+
+MS_PER_FRAME = 10
+millis = 0
+
+width, height = 600, 600
+mouse = [0,0]
+
+# filters
+NUM_FILTERS = 2
+NEAREST, LINEAR = range(NUM_FILTERS)
+
+filterToGL = {NEAREST: GL_NEAREST, LINEAR: GL_LINEAR}
+filterToString = {NEAREST: "GL_NEAREST", LINEAR: "GL_LINEAR"}
+
+mini = 0
+magni = 0
+
+# images
+IMAGES = ["spaghetti.jpg","checks.png"]
+IMAGE_POWER_OF_TWO = [False, True]
+NUM_IMAGES = len(IMAGES)
+image = 0
+
+def load_image_and_bind():
+	im = Image.open(IMAGES[image]).transpose(Image.FLIP_TOP_BOTTOM)
+	if not IMAGE_POWER_OF_TWO[image]:
+		# NOTE: Must be a power of 2, so let's resize it!
+		im = im.resize((512,512))
+
+	img_data = im.tostring()
+	img_size = im.size
+
+	glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, img_size[0], img_size[1], 0, GL_RGB, GL_UNSIGNED_BYTE, img_data)
+	update_filters()
+
+def update_filters():	
+	glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filterToGL[mini])
+	glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filterToGL[magni])
+
+def display():
+	glClear(GL_COLOR_BUFFER_BIT)
+	glLoadIdentity()
+
+	glEnable(GL_TEXTURE_2D)
+
+	glPushMatrix()
+	
+	# rotate around y-axis=0.5
+	glTranslatef(.5,.5,0)
+	glRotatef(360*0.05*millis/1000.,.3,1,0)
+	glScalef(1.0*mouse[0]/width, 1.0*(height-mouse[1])/height, 1)
+	glTranslatef(-.5,-.5,0)
+
+
+	glBegin(GL_QUADS)
+	glTexCoord2f(0,0)
+	glVertex3f(0,0,0)
+	glTexCoord2f(1,0)
+	glVertex3f(1,0,0)
+	glTexCoord2f(1,1)
+	glVertex3f(1,1,0)
+	glTexCoord2f(0,1)
+	glVertex3f(0,1,0)
+	glEnd()
+
+	glPopMatrix()
+
+	glColor3f(1,1,1)
+	glRasterPos2f(0,.2)
+	for s in "Minification: " + filterToString[mini]:
+		glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, ord(s))
+	glRasterPos2f(0,.1)
+	for s in "Magnification: " + filterToString[magni]:
+		glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, ord(s))
+
+	glFlush()
+
+def init():
+	glClearColor(0,0,0,0)
+	glMatrixMode(GL_PROJECTION)
+	glLoadIdentity()
+	gluOrtho2D(0,1,0,1)
+	glMatrixMode(GL_MODELVIEW)
+
+	load_image_and_bind()
+
+def resize(w,h):
+	global width, height
+	width, height = w,h
+	glViewport(0,0,w,h)
+	glutPostRedisplay()
+
+def motion(x,y):
+	global mouse
+	mouse = x, y
+	glutPostRedisplay()
+
+def timer(i):
+	global millis
+	millis += MS_PER_FRAME
+	glutPostRedisplay()
+	glutTimerFunc(MS_PER_FRAME,timer,0)
+
+def key(key,x,y):
+	global mini, magni, image
+	if key=='a':
+		mini = (mini + 1)%NUM_FILTERS
+	elif key=='z':
+		magni = (magni + 1)%NUM_FILTERS
+	elif key=='i':
+		image = (image + 1)%NUM_IMAGES
+		load_image_and_bind()
+	else:
+		print("a/z to change filters, i to change image")
+	update_filters()
+	glutPostRedisplay()
+
+def keysp(key,x,y):
+	glutPostRedisplay()
+
+if __name__=="__main__":
+	glutInit()
+	glutInitWindowSize(width,height)
+	glutInitDisplayMode(GLUT_DEPTH)
+	glutCreateWindow(".")
+	init()
+	glutDisplayFunc(display)
+	glutReshapeFunc(resize)
+	glutPassiveMotionFunc(motion)
+	glutKeyboardFunc(key)
+	glutSpecialFunc(keysp)
+	glutTimerFunc(MS_PER_FRAME,timer,0)
+	glutMainLoop()
+

File opengl/python/l18/mipmap.py

+#
+# Demonstrates mipmapping
+# BP 21.09.2010
+#
+
+from OpenGL.GL import *
+from OpenGL.GLU import *
+from OpenGL.GLUT import *
+
+from PIL import Image
+
+MS_PER_FRAME = 10
+millis = 0
+
+width, height = 600, 600
+mouse = [0,0]
+
+# filters
+NUM_FILTERS = 4
+NEAREST, LINEAR, MIPMAP_COARSE, MIPMAP_FINE = range(NUM_FILTERS)
+
+filterToGL = {NEAREST: GL_NEAREST, 
+		LINEAR: GL_LINEAR,
+		MIPMAP_COARSE: GL_LINEAR_MIPMAP_NEAREST, # also see other modes
+		MIPMAP_FINE: GL_LINEAR_MIPMAP_LINEAR		
+		}
+filterToString = {NEAREST: "GL_NEAREST", 
+		LINEAR: "GL_LINEAR",
+		MIPMAP_COARSE: "GL_LINEAR_MIPMAP_NEAREST",
+		MIPMAP_FINE: "GL_LINEAR_MIPMAP_LINEAR"
+		}
+
+mini = 0
+magni = 1 # always 1
+
+# perspective hint
+NUM_PERSP = 2
+PERSP_FAST, PERSP_NICE = range(NUM_PERSP)
+perspToGL = {PERSP_FAST: GL_FASTEST, PERSP_NICE: GL_NICEST}
+perspToString = {PERSP_FAST: "GL_FASTEST", PERSP_NICE: "GL_NICEST"}
+persp = 0
+
+# images
+IMAGES = ["spaghetti.jpg","checks.png"]
+IMAGE_POWER_OF_TWO = [False, True]
+NUM_IMAGES = len(IMAGES)
+image = 0
+
+def load_image_and_bind():
+	im = Image.open(IMAGES[image]).transpose(Image.FLIP_TOP_BOTTOM)
+	if not IMAGE_POWER_OF_TWO[image]:
+		# NOTE: Must be a power of 2, so let's resize it!
+		im = im.resize((512,512))
+
+	img_data = im.tostring()
+	img_size = im.size
+
+	#glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, img_size[0], img_size[1], 0, GL_RGB, GL_UNSIGNED_BYTE, img_data)
+	# generate mipmaps (even though we may not use them)
+	gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGB, img_size[0], img_size[1], GL_RGB, GL_UNSIGNED_BYTE, img_data)
+
+	update_filters()
+	update_persp()
+
+def update_filters():	
+	glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filterToGL[mini])
+	glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filterToGL[magni])
+
+def update_persp():
+	glHint(GL_PERSPECTIVE_CORRECTION_HINT, perspToGL[persp])
+
+def display():
+	glClear(GL_COLOR_BUFFER_BIT)
+	glLoadIdentity()
+
+	glEnable(GL_TEXTURE_2D)
+
+	glPushMatrix()
+	
+	# rotate around y-axis=0.5
+	glTranslatef(.5,.5,0)
+	glRotatef(360*0.05*millis/1000.,.3,1,0)
+	glScalef(1.0*mouse[0]/width, 1.0*(height-mouse[1])/height, 1)
+	glTranslatef(-.5,-.5,0)
+
+
+	glBegin(GL_QUADS)
+	glTexCoord2f(0,0)
+	glVertex3f(0,0,0)
+	glTexCoord2f(1,0)
+	glVertex3f(1,0,0)
+	glTexCoord2f(1,1)
+	glVertex3f(1,1,0)
+	glTexCoord2f(0,1)
+	glVertex3f(0,1,0)
+	glEnd()
+
+	glPopMatrix()
+
+	glColor3f(1,1,1)
+	glRasterPos2f(0,.3)
+	for s in "Minification: " + filterToString[mini]:
+		glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, ord(s))
+	glRasterPos2f(0,.2)
+	for s in "Magnification: " + filterToString[magni]:
+		glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, ord(s))
+	glRasterPos2f(0,.1)
+	for s in "Perspective Hint: " + perspToString[persp]:
+		glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, ord(s))
+
+	glFlush()
+
+def init():
+	glClearColor(0,0,0,0)
+	glMatrixMode(GL_PROJECTION)
+	glLoadIdentity()
+	gluOrtho2D(0,1,0,1)
+	glMatrixMode(GL_MODELVIEW)
+
+	load_image_and_bind()
+
+def resize(w,h):
+	global width, height
+	width, height = w,h
+	glViewport(0,0,w,h)
+	glutPostRedisplay()
+
+def motion(x,y):
+	global mouse
+	mouse = x, y
+	glutPostRedisplay()
+
+def timer(i):
+	global millis
+	millis += MS_PER_FRAME
+	glutPostRedisplay()
+	glutTimerFunc(MS_PER_FRAME,timer,0)
+
+def key(key,x,y):
+	global mini, magni, image, persp
+	if key=='a':
+		mini = (mini + 1)%NUM_FILTERS
+	elif key=='z':
+		print("magnification filter control disabled")
+	elif key=='i':
+		image = (image + 1)%NUM_IMAGES
+		load_image_and_bind()
+	elif key=='p':
+		persp = (persp + 1)%NUM_PERSP
+		update_persp()
+	else:
+		print("a/z to change filters, i to change image, p to change persp hint")
+	update_filters()
+	glutPostRedisplay()
+
+def keysp(key,x,y):
+	glutPostRedisplay()
+
+if __name__=="__main__":
+	glutInit()
+	glutInitWindowSize(width,height)
+	glutInitDisplayMode(GLUT_DEPTH)
+	glutCreateWindow(".")
+	init()
+	glutDisplayFunc(display)
+	glutReshapeFunc(resize)
+	glutPassiveMotionFunc(motion)
+	glutKeyboardFunc(key)
+	glutSpecialFunc(keysp)
+	glutTimerFunc(MS_PER_FRAME,timer,0)
+	glutMainLoop()
+

File opengl/python/l18/shiny_monkey.py

 	img_size = im.size
 
 	glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, img_size[0], img_size[1], 0, GL_RGB, GL_UNSIGNED_BYTE, img_data)
-	glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST)
-	glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST)
+	glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR)
+	glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR)
 
 	glTexGenfv(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP)
 	glTexGenfv(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP)

File opengl/python/l18/stelarc-5-misc.jpg

Added
New image

File opengl/python/l18/stelarc-stretched-skin-2009.jpg

Added
New image

File opengl/python/l18/texture.py

 	glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, img_size[0], img_size[1], 0, GL_RGB, GL_UNSIGNED_BYTE, img_data)
 	glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST)
 	glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST)
-	glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT)
-	glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT)	
+	#glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT)
+	#glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT)	
 
 def display():
 	glClear(GL_COLOR_BUFFER_BIT)
 	glTexCoord2f(1,1)
 	glVertex3f(1,1,0)
 	glTexCoord2f(0,1)
-	glVertex3f(0,1,0)
+	glVertex3f(0.2,.8,0)
 	glEnd()
 
 	glFlush()

File opengl/python/l19/aa.py

+#
+# Demonstrates basic GL anti-aliasing
+# BP 22.09.2010
+#
+
+from OpenGL.GL import *
+from OpenGL.GLU import *
+from OpenGL.GLUT import *
+
+from random import random
+
+MS_PER_FRAME = 10
+millis = 0
+
+width, height = 600, 600
+mouse = [0,0]
+
+# A square is an [x,y,x',y',colour,r,r'] tuple
+# that floats around the space
+NUM_SQUARES = 100
+SQUARE_SIZE = .1
+SQUARE_SPEED = .01
+squares = [[random(),random(),0,0,(random(),random(),random()),random()*360,random()] for i in range(NUM_SQUARES)]
+
+aa = True
+
+def display():
+	glClear(GL_COLOR_BUFFER_BIT)
+	glLoadIdentity()
+
+	for sq in squares:
+		glPushMatrix()
+		glColor3fv(sq[4])
+		p = ((sq[0]-SQUARE_SIZE/2,sq[1]-SQUARE_SIZE/2),
+							(sq[0]+SQUARE_SIZE/2,sq[1]+SQUARE_SIZE/2))
+		glTranslatef(sq[0],sq[1],0)
+		glRotatef(sq[5],0,0,1)
+		glTranslatef(-sq[0],-sq[1],0)
+		glBegin(GL_LINE_LOOP)
+		glVertex2f(p[0][0],p[0][1])
+		glVertex2f(p[1][0],p[0][1])
+		glVertex2f(p[1][0],p[1][1])
+		glVertex2f(p[0][0],p[1][1])
+		glEnd()
+		glPopMatrix()
+
+	glFlush()
+
+def move_squares():
+	for sq in squares:
+		sq[0] += sq[2]*SQUARE_SPEED
+		sq[1] += sq[3]*SQUARE_SPEED
+		# always attracted to the center (.5,.5)
+		x_attract = .5-sq[0]
+		y_attract = .5-sq[1]
+
+		sq[2] += x_attract*random()*.001
+		sq[3] += y_attract*random()*.001
+
+		sq[5] += sq[6]
+
+def toggle_aa():
+	global aa
+	if aa:
+		aa = False
+		glDisable(GL_LINE_SMOOTH)
+	else:
+		aa = True
+		glEnable(GL_LINE_SMOOTH)
+
+def init():
+	glClearColor(1,1,1,1)
+	glEnable(GL_BLEND)
+	glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
+
+	glEnable(GL_LINE_SMOOTH)
+	glHint(GL_LINE_SMOOTH_HINT, GL_NICEST)
+
+	glMatrixMode(GL_PROJECTION)
+	glLoadIdentity()
+	gluOrtho2D(0,1,0,1)
+	glMatrixMode(GL_MODELVIEW)
+
+def resize(w,h):
+	global width, height
+	width, height = w,h
+	glViewport(0,0,w,h)
+	glutPostRedisplay()
+
+def motion(x,y):
+	global mouse
+	mouse = x, y
+	glutPostRedisplay()
+
+def timer(i):
+	global millis
+	millis += MS_PER_FRAME
+	move_squares()
+	glutPostRedisplay()
+	glutTimerFunc(MS_PER_FRAME,timer,0)
+
+def key(key,x,y):
+	toggle_aa()
+	glutPostRedisplay()
+
+def keysp(key,x,y):
+	glutPostRedisplay()
+
+if __name__=="__main__":
+	glutInit()
+	glutInitWindowSize(width,height)
+	glutInitDisplayMode(GLUT_DEPTH)
+	glutCreateWindow(".")
+	init()
+	glutDisplayFunc(display)
+	glutReshapeFunc(resize)
+	glutPassiveMotionFunc(motion)
+	glutKeyboardFunc(key)
+	glutSpecialFunc(keysp)
+	glutTimerFunc(MS_PER_FRAME,timer,0)
+	glutMainLoop()
+

File opengl/python/l19/accum.py

+#
+# Demonstrates the use of the accumulation buffer
+# BP 21.09.2010
+#
+
+from OpenGL.GL import *
+from OpenGL.GLU import *
+from OpenGL.GLUT import *
+
+from PIL import Image
+
+width, height = 600, 600
+mouse = [0,0]
+MS_PER_FRAME = 10
+millis = 0
+from geometry import *
+
+monkey = None # GeometricModel
+
+accum = False
+
+def toggle_accum():
+	global accum
+	accum = not accum
+
+def load_image_and_bind():
+	global img_data, img_size
+	im = Image.open("sphere_map.jpg").transpose(Image.FLIP_TOP_BOTTOM)
+	# NOTE: Is already a a power of 2
+	# im = im.resize((512,512))
+
+	img_data = im.tostring()
+	img_size = im.size
+
+	glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, img_size[0], img_size[1], 0, GL_RGB, GL_UNSIGNED_BYTE, img_data)
+	glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR)
+	glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR)
+
+	glTexGenfv(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP)
+	glTexGenfv(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP)
+
+	glEnable(GL_TEXTURE_2D)
+	glEnable(GL_TEXTURE_GEN_S)
+	glEnable(GL_TEXTURE_GEN_T)
+
+def display():
+	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
+	glLoadIdentity()
+
+	# render scene
+	
+	gluLookAt(1.5,1.5,1.3,0,0,0,0,1,0)
+	glColor3f(1,1,1)	
+	glRotatef(3*360.*mouse[0]/width,0,1,0)
+	glRotatef(2*360.*mouse[1]/height,1,0,0)
+
+	monkey.draw()
+
+	if accum:
+		# add results into accum and multiply by some small amount 
+		glAccum(GL_ACCUM, .05)
+		glAccum(GL_MULT, .95)
+	
+		# read accumulation buffer back into colour buffer
+		glAccum(GL_RETURN, 1)
+	
+	glFlush()
+
+def init():
+	global monkey
+	monkey = ObjFile('monkey.obj').get_geometry()
+
+	glClearColor(0,0,0,0)
+
+	glEnable(GL_DEPTH_TEST)
+
+	glMatrixMode(GL_PROJECTION)
+	glLoadIdentity()
+	gluPerspective(60,1,0.1,10)
+	glMatrixMode(GL_MODELVIEW)
+
+	load_image_and_bind()
+
+	glClearAccum(0,0,0,1)
+	glClear(GL_ACCUM_BUFFER_BIT)
+
+def timer(i):
+	global millis
+	millis += MS_PER_FRAME
+	glutPostRedisplay()
+	glutTimerFunc(MS_PER_FRAME,timer,0)
+
+
+def resize(w,h):
+	global width, height
+	width, height = w,h
+	glViewport(0,0,w,h)
+	glutPostRedisplay()
+
+def motion(x,y):
+	global mouse
+	mouse = x,y
+	glutPostRedisplay()
+
+def key(key,x,y):
+	toggle_accum()
+	glutPostRedisplay()
+
+if __name__=="__main__":
+	glutInit()
+	glutInitWindowSize(width,height)
+	glutInitDisplayMode(GLUT_SINGLE | GLUT_DEPTH | GLUT_ACCUM)
+	glutCreateWindow("shiny monkey time!")
+	init()
+	glutDisplayFunc(display)
+	glutReshapeFunc(resize)
+	glutPassiveMotionFunc(motion)
+	glutKeyboardFunc(key)
+	glutTimerFunc(MS_PER_FRAME,timer,0)
+	glutMainLoop()
+

File opengl/python/l19/blend.py

+#
+# Demonstrates basic GL blending.
+# BP 22.09.2010
+#
+
+from OpenGL.GL import *
+from OpenGL.GLU import *
+from OpenGL.GLUT import *
+
+from random import random
+
+MS_PER_FRAME = 10
+millis = 0
+
+width, height = 600, 600
+mouse = [0,0]
+
+# A square is an [x,y,x',y',colour] tuple
+# that floats around the space
+NUM_SQUARES = 100
+SQUARE_SIZE = .1
+SQUARE_SPEED = .1
+MAX_SQUARE_ALPHA = .5
+squares = [[random(),random(),0,0,(random(),random(),random(),MAX_SQUARE_ALPHA*random())] for i in range(NUM_SQUARES)]
+
+def display():
+	glClear(GL_COLOR_BUFFER_BIT)
+	glLoadIdentity()
+
+	for sq in squares:
+		glColor4fv(sq[4])
+		glRectf(sq[0]-SQUARE_SIZE/2,sq[1]-SQUARE_SIZE/2,
+				sq[0]+SQUARE_SIZE/2,sq[1]+SQUARE_SIZE/2)
+
+	glFlush()
+
+def move_squares():
+	for sq in squares:
+		sq[0] += sq[2]*SQUARE_SPEED
+		sq[1] += sq[3]*SQUARE_SPEED
+		# always attracted to the center (.5,.5)
+		x_attract = .5-sq[0]
+		y_attract = .5-sq[1]
+
+		sq[2] += x_attract*random()*.001
+		sq[3] += y_attract*random()*.001
+
+def init():
+	glClearColor(1,1,1,1)
+	glEnable(GL_BLEND)
+	glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
+
+	glMatrixMode(GL_PROJECTION)
+	glLoadIdentity()
+	gluOrtho2D(0,1,0,1)
+	glMatrixMode(GL_MODELVIEW)
+
+def resize(w,h):
+	global width, height
+	width, height = w,h
+	glViewport(0,0,w,h)
+	glutPostRedisplay()
+
+def motion(x,y):
+	global mouse
+	mouse = x, y
+	glutPostRedisplay()
+
+def timer(i):
+	global millis
+	millis += MS_PER_FRAME
+	move_squares()
+	glutPostRedisplay()
+	glutTimerFunc(MS_PER_FRAME,timer,0)
+
+def key(key,x,y):
+	glutPostRedisplay()
+
+def keysp(key,x,y):
+	glutPostRedisplay()
+
+if __name__=="__main__":
+	glutInit()
+	glutInitWindowSize(width,height)
+	glutInitDisplayMode(GLUT_DEPTH)
+	glutCreateWindow(".")
+	init()
+	glutDisplayFunc(display)
+	glutReshapeFunc(resize)
+	glutPassiveMotionFunc(motion)
+	glutKeyboardFunc(key)
+	glutSpecialFunc(keysp)
+	glutTimerFunc(MS_PER_FRAME,timer,0)
+	glutMainLoop()
+

File opengl/python/l19/geometry.py

+from OpenGL.GL import *
+from random import random
+
+class GeometricModel(object):
+	""" A geometric model that can render itself in OpenGL. """
+
+	def __init__(self):
+		self.vertices = []
+		self.faces = [] # each face is a 4-tuple with either 1-index or 2
+		self.colours = []
+		self.normals = []
+
+		self.dl = None
+
+	def draw(self):
+		# on the first time around it caches itself in a display list
+		if self.dl is None:
+			self.dl = glGenLists(1)
+			glNewList(self.dl, GL_COMPILE_AND_EXECUTE)
+			
+			glBegin(GL_QUADS)
+			
+			draw_normals = False
+			if len(self.normals)>0:
+				draw_normals = True
+
+			draw_colours = False
+			if len(self.colours)>0:
+				draw_colours = True
+
+			normals = self.normals if draw_normals else [None]*len(self.faces)
+			
+			for f in self.faces:
+				if len(f)==4:
+					if draw_colours: glColor3fv(self.colours[self.faces.index(f)])
+					for v in f:	
+						if draw_normals:
+							glNormal3fv(self.normals[v[1]])
+							glVertex3fv(self.vertices[v[0]])
+						else:
+							glVertex3fv(self.vertices[v])
+			glEnd()
+			glBegin(GL_TRIANGLES)
+			for f in self.faces:
+				if len(f)==3:
+					if draw_colours: glColor3fv(self.colours[self.faces.index(f)])
+					for v in f:	
+						if draw_normals:
+							glNormal3fv(self.normals[v[1]])
+							glVertex3fv(self.vertices[v[0]])
+						else:
+							glVertex3fv(self.vertices[v])
+			glEnd()
+			glEndList()
+		else:
+			glCallList(self.dl)
+
+class ObjFile(object):
+	""" (Stupidly) reads in an .obj file and stores it in a geometry object. """
+
+	def __init__(self, name):
+		self.file = open(name,'r')
+
+	def get_geometry(self, randomise_face_colours=False, compute_normals=False):
+		""" Get the geometric model described by this file. """
+		vertices = []
+		faces = []
+		colours = []
+		normals = []
+
+		for line in self.file.readlines():
+			split = line.split()
+			if split[0]=='v':
+				vertices.append(tuple(float(c) for c in split[1:]))
+			elif split[0]=='vn':
+				normals.append(tuple(float(c) for c in split[1:]))
+			elif split[0]=='f':
+				pieces = split[1:]
+				if '/' in pieces[0]:
+					face = []
+					for s in pieces:
+						bits = s.split('//')
+						face.append(tuple(int(c)-1 for c in s.split('//')))
+					faces.append(tuple(face))
+				else:
+					faces.append(tuple(int(c)-1 for c in split[1:]))
+				if randomise_face_colours:
+					colours.append((random(),random(),random()))
+		
+		g = GeometricModel()
+		g.vertices = vertices
+		g.faces = faces
+		g.normals = normals
+		if len(colours)>0:
+			g.colours = colours
+		return g

File opengl/python/l19/monkey.obj

+# Blender3D v2.52 (sub 0) OBJ File: <memory2>
+# www.blender3d.org
+o Mesh
+v 0.492188 0.720703 -0.185547
+v -0.492188 0.720703 -0.185547
+v 0.558594 0.625000 -0.158203
+v -0.558594 0.625000 -0.158203
+v 0.437500 0.650391 -0.039063
+v -0.437500 0.650391 -0.039063
+v 0.410156 0.738281 -0.105469
+v -0.410156 0.738281 -0.105469
+v 0.294922 0.759766 -0.105469
+v -0.294922 0.759766 -0.105469
+v 0.265625 0.681641 -0.039063
+v -0.265625 0.681641 -0.039063
+v 0.144531 0.697266 -0.158203
+v -0.144531 0.697266 -0.158203
+v 0.214844 0.769531 -0.185547
+v -0.214844 0.769531 -0.185547
+v 0.214844 0.769531 -0.300781
+v -0.214844 0.769531 -0.300781
+v 0.144531 0.697266 -0.328125
+v -0.144531 0.697266 -0.328125
+v 0.265625 0.681641 -0.449219
+v -0.265625 0.681641 -0.449219
+v 0.294922 0.759766 -0.382813
+v -0.294922 0.759766 -0.382813
+v 0.410156 0.738281 -0.382813
+v -0.410156 0.738281 -0.382813
+v 0.437500 0.650391 -0.449219
+v -0.437500 0.650391 -0.449219
+v 0.558594 0.625000 -0.328125
+v -0.558594 0.625000 -0.328125
+v 0.492188 0.720703 -0.300781
+v -0.492188 0.720703 -0.300781
+v 0.457031 0.769531 -0.287109
+v -0.457031 0.769531 -0.287109
+v 0.396484 0.783203 -0.349609
+v -0.396484 0.783203 -0.349609
+v 0.310547 0.800781 -0.349609
+v -0.310547 0.800781 -0.349609
+v 0.251953 0.808594 -0.287109
+v -0.251953 0.808594 -0.287109
+v 0.251953 0.808594 -0.201172
+v -0.251953 0.808594 -0.201172
+v 0.310547 0.800781 -0.142578
+v -0.310547 0.800781 -0.142578
+v 0.396484 0.783203 -0.142578
+v -0.396484 0.783203 -0.142578
+v 0.457031 0.769531 -0.201172
+v -0.457031 0.769531 -0.201172
+v 0.424479 0.794271 -0.213542
+v -0.424479 0.794271 -0.213542
+v 0.382812 0.804688 -0.171875
+v -0.382812 0.804688 -0.171875
+v 0.322917 0.817708 -0.171875
+v -0.322917 0.817708 -0.171875
+v 0.281250 0.822917 -0.213542
+v -0.281250 0.822917 -0.213542
+v 0.281250 0.822917 -0.273438
+v -0.281250 0.822917 -0.273438
+v 0.322917 0.817708 -0.317708
+v -0.322917 0.817708 -0.317708
+v 0.382812 0.804688 -0.317708
+v -0.382812 0.804688 -0.317708
+v 0.424479 0.794271 -0.273438
+v -0.424479 0.794271 -0.273438
+v 0.085938 0.601563 0.957031
+v -0.085938 0.601563 0.957031
+v 0.226562 0.585938 0.939453
+v -0.226562 0.585938 0.939453
+v 0.298828 0.587891 0.892578
+v -0.298828 0.587891 0.892578
+v 0.308594 0.613281 0.777344
+v -0.308594 0.613281 0.777344
+v 0.281250 0.634766 0.570312
+v -0.281250 0.634766 0.570312
+v 0.291016 0.644531 0.119141
+v -0.291016 0.644531 0.119141
+v 0.521484 0.591797 0.042969
+v -0.521484 0.591797 0.042969
+v 0.701172 0.552734 -0.091797
+v -0.701172 0.552734 -0.091797
+v 0.789062 0.574219 -0.289063
+v -0.789062 0.574219 -0.289063
+v 0.750000 0.650391 -0.425781
+v -0.750000 0.650391 -0.425781
+v 0.582031 0.708984 -0.511719
+v -0.582031 0.708984 -0.511719
+v 0.390625 0.763672 -0.636719
+v -0.390625 0.763672 -0.636719
+v 0.248047 0.794922 -0.683594
+v -0.248047 0.794922 -0.683594
+v 0.130859 0.800781 -0.564453
+v -0.130859 0.800781 -0.564453
+v 0.041016 0.789062 -0.425781
+v -0.041016 0.789062 -0.425781
+v 0.179688 0.806641 -0.482422
+v -0.179688 0.806641 -0.482422
+v 0.273438 0.796875 -0.550781
+v -0.273438 0.796875 -0.550781
+v 0.376953 0.773438 -0.525391
+v -0.376953 0.773438 -0.525391
+v 0.539062 0.726562 -0.443359
+v -0.539062 0.726562 -0.443359
+v 0.667969 0.673828 -0.365234
+v -0.667969 0.673828 -0.365234
+v 0.683594 0.638672 -0.265625
+v -0.683594 0.638672 -0.265625
+v 0.615234 0.636719 -0.126953
+v -0.615234 0.636719 -0.126953
+v 0.470703 0.667969 -0.021484
+v -0.470703 0.667969 -0.021484
+v 0.275391 0.732422 0.009766
+v -0.275391 0.732422 0.009766
+v 0.123047 0.757812 -0.044922
+v -0.123047 0.757812 -0.044922
+v 0.097656 0.800781 -0.375000
+v -0.097656 0.800781 -0.375000
+v 0.064453 0.777344 -0.269531
+v -0.064453 0.777344 -0.269531
+v 0.074219 0.750000 -0.152344
+v -0.074219 0.750000 -0.152344
+v 0.056641 0.664063 0.912109
+v -0.056641 0.664063 0.912109
+v 0.144531 0.667969 0.890625
+v -0.144531 0.667969 0.890625
+v 0.181641 0.685547 0.822266
+v -0.181641 0.685547 0.822266
+v 0.164062 0.720703 0.570312
+v -0.164062 0.720703 0.570312
+v 0.185547 0.705078 0.732422
+v -0.185547 0.705078 0.732422
+v 0.041016 0.746094 0.376953
+v -0.041016 0.746094 0.376953
+v 0.048828 0.742188 0.564453
+v -0.048828 0.742188 0.564453
+v 0.056641 0.734375 0.712891
+v -0.056641 0.734375 0.712891
+v 0.109375 0.767578 0.253906
+v -0.109375 0.767578 0.253906
+v 0.117188 0.767578 0.183594
+v -0.117188 0.767578 0.183594
+v 0.062500 0.761719 0.136719
+v -0.062500 0.761719 0.136719
+v 0.009766 0.767578 0.162109
+v -0.009766 0.767578 0.162109
+v 0.044922 0.761719 0.302734
+v -0.044922 0.761719 0.302734
+v 0.042969 0.792969 0.283203
+v -0.042969 0.792969 0.283203
+v 0.021484 0.804688 0.166016
+v -0.021484 0.804688 0.166016
+v 0.072266 0.796875 0.140625
+v -0.072266 0.796875 0.140625
+v 0.111328 0.804688 0.185547
+v -0.111328 0.804688 0.185547
+v 0.103516 0.802734 0.244141
+v -0.103516 0.802734 0.244141
+v 0.062500 0.820312 0.183594
+v -0.062500 0.820312 0.183594
+v 0.046875 0.816406 0.242187
+v -0.046875 0.816406 0.242187
+v 0.056641 0.755859 0.085937
+v -0.056641 0.755859 0.085937
+v 0.128906 0.753906 0.179687
+v -0.128906 0.753906 0.179687
+v 0.138672 0.728516 0.267578
+v -0.138672 0.728516 0.267578
+v 0.138672 0.728516 0.373047
+v -0.138672 0.728516 0.373047
+v 0.240234 0.636719 0.376953
+v -0.240234 0.636719 0.376953
+v 0.208984 0.632812 0.279297
+v -0.208984 0.632812 0.279297
+v 0.181641 0.660156 0.195312
+v -0.181641 0.660156 0.195312
+v 0.050781 0.728516 0.750000
+v -0.050781 0.728516 0.750000
+v 0.103516 0.720703 0.779297
+v -0.103516 0.720703 0.779297
+v 0.080078 0.701172 0.851562
+v -0.080078 0.701172 0.851562
+v 0.027344 0.689453 0.878906
+v -0.027344 0.689453 0.878906
+v 0.023438 0.660156 0.863281
+v -0.023438 0.660156 0.863281
+v 0.070312 0.667969 0.837891
+v -0.070312 0.667969 0.837891
+v 0.093750 0.685547 0.781250
+v -0.093750 0.685547 0.781250
+v 0.046875 0.691406 0.761719
+v -0.046875 0.691406 0.761719
+v 0.035156 0.646484 0.810547
+v -0.035156 0.646484 0.810547
+v 0.078125 0.645833 0.804688
+v -0.078125 0.645833 0.804688
+v 0.164062 0.765625 -0.181641
+v -0.164062 0.765625 -0.181641
+v 0.152344 0.771484 -0.257813
+v -0.152344 0.771484 -0.257813
+v 0.169922 0.775391 -0.347656
+v -0.169922 0.775391 -0.347656
+v 0.195312 0.761719 -0.125000
+v -0.195312 0.761719 -0.125000
+v 0.294922 0.742188 -0.070313
+v -0.294922 0.742188 -0.070313
+v 0.429688 0.708984 -0.060547
+v -0.429688 0.708984 -0.060547
+v 0.542969 0.679688 -0.136719
+v -0.542969 0.679688 -0.136719
+v 0.607422 0.666016 -0.242188
+v -0.607422 0.666016 -0.242188
+v 0.597656 0.673828 -0.328125
+v -0.597656 0.673828 -0.328125
+v 0.503906 0.712891 -0.390625
+v -0.503906 0.712891 -0.390625
+v 0.378906 0.748047 -0.435547
+v -0.378906 0.748047 -0.435547
+v 0.296875 0.757812 -0.449219
+v -0.296875 0.757812 -0.449219
+v 0.224609 0.771484 -0.419922
+v -0.224609 0.771484 -0.419922
+v 0.250000 0.769531 -0.388672
+v -0.250000 0.769531 -0.388672
+v 0.306641 0.761719 -0.414063
+v -0.306641 0.761719 -0.414063
+v 0.376953 0.757812 -0.406250
+v -0.376953 0.757812 -0.406250
+v 0.482422 0.724609 -0.369141
+v -0.482422 0.724609 -0.369141
+v 0.558594 0.683594 -0.314453
+v -0.558594 0.683594 -0.314453
+v 0.566406 0.677734 -0.244141
+v -0.566406 0.677734 -0.244141
+v 0.515625 0.693359 -0.156250
+v -0.515625 0.693359 -0.156250
+v 0.421875 0.722656 -0.091797
+v -0.421875 0.722656 -0.091797
+v 0.304688 0.751953 -0.095703
+v -0.304688 0.751953 -0.095703
+v 0.214844 0.765625 -0.140625
+v -0.214844 0.765625 -0.140625
+v 0.205078 0.769531 -0.332031
+v -0.205078 0.769531 -0.332031
+v 0.185547 0.767578 -0.259766
+v -0.185547 0.767578 -0.259766
+v 0.189453 0.763672 -0.193359
+v -0.189453 0.763672 -0.193359
+v 0.042969 0.675781 -0.447266
+v -0.042969 0.675781 -0.447266
+v 0.130859 0.683594 -0.583984
+v -0.130859 0.683594 -0.583984
+v 0.251953 0.675781 -0.707031
+v -0.251953 0.675781 -0.707031
+v 0.408203 0.642578 -0.650391
+v -0.408203 0.642578 -0.650391
+v 0.591797 0.589844 -0.523438
+v -0.591797 0.589844 -0.523438
+v 0.761719 0.542969 -0.443359
+v -0.761719 0.542969 -0.443359
+v 0.814453 0.468750 -0.287109
+v -0.814453 0.468750 -0.287109
+v 0.708984 0.443359 -0.068359
+v -0.708984 0.443359 -0.068359
+v 0.527344 0.488281 0.068359
+v -0.527344 0.488281 0.068359
+v 0.076172 0.304688 0.501953
+v -0.076172 0.304688 0.501953
+v 0.066406 0.347656 0.667969
+v -0.066406 0.347656 0.667969
+v 0.076172 0.402344 0.871094
+v -0.076172 0.402344 0.871094
+v 0.085938 0.507813 0.968750
+v -0.085938 0.507813 0.968750
+v 0.250000 0.478516 0.943359
+v -0.250000 0.478516 0.943359
+v 0.328125 0.458984 0.865234
+v -0.328125 0.458984 0.865234
+v 0.314453 0.468750 0.699219
+v -0.314453 0.468750 0.699219
+v 0.201172 0.375000 0.626953
+v -0.201172 0.375000 0.626953
+v 0.230469 0.396484 0.832031
+v -0.230469 0.396484 0.832031
+v 0.197266 0.353516 0.451172
+v -0.197266 0.353516 0.451172
+v 0.287109 0.484375 0.496094
+v -0.287109 0.484375 0.496094
+v 0.230469 0.501953 0.267578
+v -0.230469 0.501953 0.267578
+v 0.255859 0.490234 0.345703
+v -0.255859 0.490234 0.345703
+v 0.212891 0.521484 0.208984
+v -0.212891 0.521484 0.208984
+v 0.320312 0.515625 0.148437
+v -0.320312 0.515625 0.148437
+v 0.169922 -0.675781 0.054688
+v -0.169922 -0.675781 0.054688
+v 0.160156 -0.457031 0.259766
+v -0.160156 -0.457031 0.259766
+v 0.126953 -0.066406 0.386719
+v -0.126953 -0.066406 0.386719
+v 0.097656 0.222656 0.437500
+v -0.097656 0.222656 0.437500
+v 0.210938 0.314453 0.359375
+v -0.210938 0.314453 0.359375
+v 0.740234 0.228516 -0.087891
+v -0.740234 0.228516 -0.087891
+v 0.199219 -0.761719 -0.281250
+v -0.199219 -0.761719 -0.281250
+v 0.226562 0.093750 -0.916016
+v -0.226562 0.093750 -0.916016
+v 0.226562 -0.269531 -0.919922
+v -0.226562 -0.269531 -0.919922
+v 0.228516 -0.621094 -0.691406
+v -0.228516 -0.621094 -0.691406
+v 0.708984 0.392578 -0.429688
+v -0.708984 0.392578 -0.429688
+v 0.699219 0.199219 -0.531250
+v -0.699219 0.199219 -0.531250
+v 0.718750 -0.033203 -0.658203
+v -0.718750 -0.033203 -0.658203
+v 0.718750 -0.279297 -0.646484
+v -0.718750 -0.279297 -0.646484
+v 0.707031 -0.457031 -0.453125
+v -0.707031 -0.457031 -0.453125
+v 0.542969 -0.529297 -0.578125
+v -0.542969 -0.529297 -0.578125
+v 0.546875 -0.273438 -0.806641
+v -0.546875 -0.273438 -0.806641
+v 0.546875 0.005859 -0.808594
+v -0.546875 0.005859 -0.808594
+v 0.546875 0.250000 -0.632812
+v -0.546875 0.250000 -0.632812
+v 0.564453 0.439453 -0.496094
+v -0.564453 0.439453 -0.496094
+v 0.228516 0.380859 -0.710938
+v -0.228516 0.380859 -0.710938
+v 0.281250 0.593750 -0.591797
+v -0.281250 0.593750 -0.591797
+v 0.263672 0.541016 -0.527344
+v -0.263672 0.541016 -0.527344
+v 0.036458 0.593750 -0.479167
+v -0.036458 0.593750 -0.479167
+v 0.787109 0.306641 -0.302734
+v -0.787109 0.306641 -0.302734
+v 0.808594 0.117187 -0.380859
+v -0.808594 0.117187 -0.380859
+v 0.818359 -0.060547 -0.457031
+v -0.818359 -0.060547 -0.457031
+v 0.796875 -0.279297 -0.437500
+v -0.796875 -0.279297 -0.437500
+v 0.335938 -0.041016 0.267578
+v -0.335938 -0.041016 0.267578
+v 0.541016 -0.039062 0.134766
+v -0.541016 -0.039062 0.134766
+v 0.544922 0.275391 0.078125
+v -0.544922 0.275391 0.078125
+v 0.318359 0.378906 0.193359
+v -0.318359 0.378906 0.193359
+v 0.278646 0.247396 0.281250
+v -0.278646 0.247396 0.281250
+v 0.283854 0.479167 0.164062
+v -0.283854 0.479167 0.164062
+v 0.628906 -0.500000 -0.152344
+v -0.628906 -0.500000 -0.152344
+v 0.474609 -0.625000 -0.210937
+v -0.474609 -0.625000 -0.210937
+v 0.537109 -0.337891 0.076172
+v -0.537109 -0.337891 0.076172
+v 0.388672 -0.390625 0.158203
+v -0.388672 -0.390625 0.158203
+v 0.388021 -0.583333 0.023438
+v -0.388021 -0.583333 0.023438
+v 0.962891 -0.263672 -0.414062
+v -0.962891 -0.263672 -0.414062
+v 1.115234 -0.353516 -0.458984
+v -1.115234 -0.353516 -0.458984
+v 1.259766 -0.410156 -0.388672
+v -1.259766 -0.410156 -0.388672
+v 1.277344 -0.416016 -0.185547
+v -1.277344 -0.416016 -0.185547
+v 1.140625 -0.367188 0.001953
+v -1.140625 -0.367188 0.001953
+v 0.917969 -0.222656 0.087891
+v -0.917969 -0.222656 0.087891
+v 0.945312 -0.253906 0.033203
+v -0.945312 -0.253906 0.033203
+v 1.117188 -0.380859 -0.033203
+v -1.117188 -0.380859 -0.033203
+v 1.224609 -0.425781 -0.177734
+v -1.224609 -0.425781 -0.177734
+v 1.214844 -0.419922 -0.333984
+v -1.214844 -0.419922 -0.333984
+v 1.099609 -0.369141 -0.388672
+v -1.099609 -0.369141 -0.388672
+v 0.976562 -0.289063 -0.355469
+v -0.976562 -0.289063 -0.355469
+v 0.693359 -0.083984 0.048828
+v -0.693359 -0.083984 0.048828
+v 0.728516 -0.148438 0.089844
+v -0.728516 -0.148438 0.089844
+v 0.792969 0.001953 -0.126953
+v -0.792969 0.001953 -0.126953
+v 0.869141 -0.216797 -0.345703
+v -0.869141 -0.216797 -0.345703
+v 0.810547 -0.197266 0.033203
+v -0.810547 -0.197266 0.033203
+v 0.773438 -0.226562 -0.003906
+v -0.773438 -0.226562 -0.003906
+v 0.785156 -0.251953 -0.058594
+v -0.785156 -0.251953 -0.058594
+v 0.777344 -0.236328 -0.126953
+v -0.777344 -0.236328 -0.126953
+v 0.841797 -0.240234 -0.226562
+v -0.841797 -0.240234 -0.226562
+v 0.900391 -0.246094 -0.298828
+v -0.900391 -0.246094 -0.298828
+v 0.830078 -0.167969 -0.285156
+v -0.830078 -0.167969 -0.285156
+v 0.775391 -0.128906 -0.140625
+v -0.775391 -0.128906 -0.140625
+v 0.721354 -0.143229 -0.005208
+v -0.721354 -0.143229 -0.005208
+v 0.919922 -0.304688 -0.267578
+v -0.919922 -0.304688 -0.267578
+v 0.865234 -0.294922 -0.205078
+v -0.865234 -0.294922 -0.205078
+v 0.800781 -0.296875 -0.132812
+v -0.800781 -0.296875 -0.132812
+v 0.792969 -0.296875 -0.087891
+v -0.792969 -0.296875 -0.087891
+v 0.835938 -0.296875 -0.048828
+v -0.835938 -0.296875 -0.048828
+v 0.830078 -0.296875 0.000000
+v -0.830078 -0.296875 0.000000
+v 0.847656 -0.267578 0.017578
+v -0.847656 -0.267578 0.017578
+v 0.990234 -0.351562 -0.316406
+v -0.990234 -0.351562 -0.316406
+v 1.105469 -0.423828 -0.343750
+v -1.105469 -0.423828 -0.343750
+v 1.212891 -0.464844 -0.298828
+v -1.212891 -0.464844 -0.298828
+v 1.222656 -0.466797 -0.167969
+v -1.222656 -0.466797 -0.167969
+v 1.121094 -0.429688 -0.044922
+v -1.121094 -0.429688 -0.044922
+v 0.962891 -0.316406 0.009766
+v -0.962891 -0.316406 0.009766
+v 0.876953 -0.326172 -0.066406
+v -0.876953 -0.326172 -0.066406
+v 0.947266 -0.345703 -0.117187
+v -0.947266 -0.345703 -0.117187
+v 1.007812 -0.369141 -0.179687
+v -1.007812 -0.369141 -0.179687
+v 1.066406 -0.384766 -0.226562
+v -1.066406 -0.384766 -0.226562
+v 1.023438 -0.380859 -0.281250
+v -1.023438 -0.380859 -0.281250
+v 0.955078 -0.347656 -0.232422
+v -0.955078 -0.347656 -0.232422
+v 0.896484 -0.330078 -0.171875
+v -0.896484 -0.330078 -0.171875
+v 0.832031 -0.322266 -0.113281
+v -0.832031 -0.322266 -0.113281
+v 0.871094 -0.310547 -0.011719
+v -0.871094 -0.310547 -0.011719
+v 0.966797 -0.347656 -0.042969
+v -0.966797 -0.347656 -0.042969
+v 1.078125 -0.414062 -0.099609
+v -1.078125 -0.414062 -0.099609
+v 1.158203 -0.437500 -0.181641
+v -1.158203 -0.437500 -0.181641
+v 1.160156 -0.439453 -0.267578
+v -1.160156 -0.439453 -0.267578
+v 1.104167 -0.429688 -0.315104
+v -1.104167 -0.429688 -0.315104
+v 0.910156 -0.318359 0.113281
+v -0.910156 -0.318359 0.113281
+v 1.167969 -0.445312 0.019531
+v -1.167969 -0.445312 0.019531
+v 1.328125 -0.470703 -0.181641
+v -1.328125 -0.470703 -0.181641
+v 1.300781 -0.472656 -0.398437
+v -1.300781 -0.472656 -0.398437
+v 1.132812 -0.441406 -0.472656
+v -1.132812 -0.441406 -0.472656
+v 0.949219 -0.353516 -0.425781
+v -0.949219 -0.353516 -0.425781
+v 0.927734 -0.421875 -0.152344
+v -0.927734 -0.421875 -0.152344
+v 1.156250 -0.513672 -0.218750
+v -1.156250 -0.513672 -0.218750
+v 1.309896 -0.526042 -0.273437
+v -1.309896 -0.526042 -0.273437
+v 0.835938 -0.314453 -0.345703
+v -0.835938 -0.314453 -0.345703
+v 0.765625 -0.394531 -0.128906
+v -0.765625 -0.394531 -0.128906
+v 0.699219 -0.261719 0.099609
+v -0.699219 -0.261719 0.099609
+v 0.463867 0.753418 -0.198242
+v 0.459961 0.728027 -0.137207
+v 0.528320 0.676270 -0.169922
+v 0.503906 0.717773 -0.242676
+v -0.459961 0.728027 -0.137207
+v -0.463867 0.753418 -0.198242
+v -0.503906 0.717773 -0.242676
+v -0.528320 0.676270 -0.169922
+v 0.510742 0.635254 -0.086426
+v 0.585938 0.570312 -0.148438
+v 0.576172 0.621094 -0.242676
+v -0.510742 0.635254 -0.086426
+v -0.576172 0.621094 -0.242676
+v -0.585938 0.570312 -0.148438
+v 0.424805 0.698730 -0.067383
+v 0.351562 0.666992 -0.021484
+v 0.449219 0.597656 -0.015625
+v -0.351562 0.666992 -0.021484
+v -0.424805 0.698730 -0.067383
+v -0.449219 0.597656 -0.015625
+v 0.398926 0.767090 -0.136230
+v 0.352051 0.749512 -0.093750
+v -0.352051 0.749512 -0.093750
+v -0.398926 0.767090 -0.136230
+v 0.307617 0.784668 -0.136230
+v 0.246582 0.767090 -0.137207
+v 0.278809 0.725586 -0.067383
+v -0.246582 0.767090 -0.137207
+v -0.307617 0.784668 -0.136230
+v -0.278809 0.725586 -0.067383
+v 0.192383 0.692383 -0.086426
+v 0.253906 0.632812 -0.015625
+v -0.192383 0.692383 -0.086426
+v -0.253906 0.632812 -0.015625
+v 0.175781 0.737793 -0.169922
+v 0.126953 0.698242 -0.242676
+v 0.117188 0.652344 -0.148438
+v -0.126953 0.698242 -0.242676
+v -0.175781 0.737793 -0.169922
+v -0.117188 0.652344 -0.148438
+v 0.245605 0.792969 -0.198242
+v 0.203125 0.769531 -0.242676
+v -0.203125 0.769531 -0.242676
+v -0.245605 0.792969 -0.198242
+v 0.245605 0.792969 -0.289551
+v 0.246582 0.767090 -0.350586
+v 0.175781 0.737793 -0.315430
+v -0.246582 0.767090 -0.350586
+v -0.245605 0.792969 -0.289551
+v -0.175781 0.737793 -0.315430
+v 0.192383 0.692383 -0.401367
+v 0.117188 0.652344 -0.339844
+v -0.192383 0.692383 -0.401367
+v -0.117188 0.652344 -0.339844
+v 0.278809 0.725586 -0.418945
+v 0.351562 0.666992 -0.466797
+v 0.253906 0.632812 -0.476563
+v -0.351562 0.666992 -0.466797
+v -0.278809 0.725586 -0.418945
+v -0.253906 0.632812 -0.476563
+v 0.307617 0.784668 -0.354980
+v 0.352051 0.749512 -0.394531
+v -0.352051 0.749512 -0.394531
+v -0.307617 0.784668 -0.354980
+v 0.398926 0.767090 -0.354980
+v 0.459961 0.728027 -0.350586
+v 0.424805 0.698730 -0.418945
+v -0.459961 0.728027 -0.350586
+v -0.398926 0.767090 -0.354980
+v -0.424805 0.698730 -0.418945
+v 0.510742 0.635254 -0.401367
+v 0.449219 0.597656 -0.476563
+v -0.510742 0.635254 -0.401367
+v -0.449219 0.597656 -0.476563
+v 0.528320 0.676270 -0.315430
+v 0.585938 0.570312 -0.339844
+v -0.528320 0.676270 -0.315430
+v -0.585938 0.570312 -0.339844
+v 0.463867 0.753418 -0.289551
+v -0.463867 0.753418 -0.289551
+v 0.434082 0.774902 -0.325195
+v 0.450846 0.779622 -0.284668
+v 0.464844 0.767578 -0.243164
+v -0.434082 0.774902 -0.325195
+v -0.464844 0.767578 -0.243164
+v -0.450846 0.779622 -0.284668
+v 0.352539 0.792480 -0.358398
+v 0.394043 0.793457 -0.344564
+v -0.352539 0.792480 -0.358398
+v -0.394043 0.793457 -0.344564
+v 0.275391 0.806641 -0.325195
+v 0.312663 0.810872 -0.344564
+v -0.275391 0.806641 -0.325195
+v -0.312663 0.810872 -0.344564
+v 0.243164 0.808594 -0.243164
+v 0.256348 0.818034 -0.284668
+v -0.243164 0.808594 -0.243164
+v -0.256348 0.818034 -0.284668
+v 0.275391 0.806641 -0.166016
+v 0.256348 0.818034 -0.203288
+v -0.275391 0.806641 -0.166016
+v -0.256348 0.818034 -0.203288
+v 0.352539 0.792480 -0.133789
+v 0.312663 0.810872 -0.146973
+v -0.352539 0.792480 -0.133789
+v -0.312663 0.810872 -0.146973
+v 0.434082 0.774902 -0.166016
+v 0.394043 0.793457 -0.146973
+v -0.434082 0.774902 -0.166016
+v -0.394043 0.793457 -0.146973
+v 0.450846 0.779622 -0.203288
+v -0.450846 0.779622 -0.203288
+v 0.401042 0.802083 -0.195964
+v 0.419271 0.797526 -0.242839
+v -0.401042 0.802083 -0.195964
+v -0.419271 0.797526 -0.242839
+v 0.352214 0.813802 -0.175781
+v -0.352214 0.813802 -0.175781
+v 0.305339 0.822266 -0.195964
+v -0.305339 0.822266 -0.195964
+v 0.285156 0.823568 -0.242839
+v -0.285156 0.823568 -0.242839
+v 0.305339 0.822266 -0.292318
+v -0.305339 0.822266 -0.292318
+v 0.352214 0.813802 -0.313151
+v -0.352214 0.813802 -0.313151
+v 0.401042 0.802083 -0.292318
+v -0.401042 0.802083 -0.292318
+v 0.164062 0.593750 0.948730
+v 0.076660 0.634766 0.936035
+v 0.000000 0.605469 0.960938
+v 0.087891 0.560547 0.969727
+v -0.076660 0.634766 0.936035
+v -0.164062 0.593750 0.948730
+v -0.087891 0.560547 0.969727
+v 0.271973 0.582520 0.922852
+v 0.192383 0.629883 0.918457
+v 0.246094 0.535645 0.949219
+v -0.192383 0.629883 0.918457
+v -0.271973 0.582520 0.922852
+v -0.246094 0.535645 0.949219
+v 0.310059 0.599121 0.845215
+v 0.245117 0.642578 0.862305
+v 0.330566 0.525391 0.898438
+v -0.245117 0.642578 0.862305
+v -0.310059 0.599121 0.845215
+v -0.330566 0.525391 0.898438
+v 0.297852 0.626465 0.686523
+v 0.252441 0.667481 0.758301
+v 0.335449 0.545898 0.765625
+v -0.252441 0.667481 0.758301
+v -0.297852 0.626465 0.686523
+v -0.335449 0.545898 0.765625
+v 0.261230 0.638184 0.457520
+v 0.226562 0.688477 0.572266
+v 0.308105 0.564941 0.549805
+v -0.226562 0.688477 0.572266
+v -0.261230 0.638184 0.457520
+v -0.308105 0.564941 0.549805
+v 0.312988 0.563477 0.148926
+v 0.412109 0.609863 0.087402
+v 0.272461 0.715332 0.069336
+v 0.200195 0.669922 0.150879
+v -0.412109 0.609863 0.087402
+v -0.312988 0.563477 0.148926
+v -0.200195 0.669922 0.150879
+v -0.272461 0.715332 0.069336
+v 0.529785 0.537598 0.072754
+v 0.618164 0.577148 -0.016113
+v 0.501953 0.639160 0.003418
+v -0.618164 0.577148 -0.016113
+v -0.529785 0.537598 0.072754
+v -0.501953 0.639160 0.003418
+v 0.717773 0.495117 -0.067383
+v 0.761230 0.543457 -0.183105
+v 0.665039 0.604004 -0.119141
+v -0.761230 0.543457 -0.183105
+v -0.717773 0.495117 -0.067383
+v -0.665039 0.604004 -0.119141
+v 0.822754 0.520508 -0.288574
+v 0.785156 0.618652 -0.379883
+v 0.735352 0.617676 -0.283203
+v -0.785156 0.618652 -0.379883
+v -0.822754 0.520508 -0.288574
+v -0.735352 0.617676 -0.283203
+v 0.770508 0.603027 -0.445801
+v 0.682617 0.677734 -0.458984
+v 0.711914 0.676758 -0.395020
+v -0.682617 0.677734 -0.458984
+v -0.770508 0.603027 -0.445801
+v -0.711914 0.676758 -0.395020
+v 0.594238 0.652832 -0.530273
+v 0.475586 0.739258 -0.574219
+v 0.561523 0.739746 -0.479004
+v -0.475586 0.739258 -0.574219
+v -0.594238 0.652832 -0.530273
+v -0.561523 0.739746 -0.479004
+v 0.402832 0.707031 -0.661621
+v 0.317871 0.782227 -0.679688
+v 0.379395 0.792480 -0.587402
+v -0.317871 0.782227 -0.679688
+v -0.402832 0.707031 -0.661621
+v -0.379395 0.792480 -0.587402
+v 0.244141 0.740723 -0.716797
+v 0.184570 0.801270 -0.645996
+v 0.259277 0.819824 -0.623047
+v -0.184570 0.801270 -0.645996
+v -0.244141 0.740723 -0.716797
+v -0.259277 0.819824 -0.623047
+v 0.120117 0.748047 -0.589844
+v 0.083984 0.795898 -0.478027
+v 0.153809 0.825684 -0.523438
+v -0.083984 0.795898 -0.478027
+v -0.120117 0.748047 -0.589844
+v -0.153809 0.825684 -0.523438
+v 0.036621 0.739258 -0.448730
+v 0.000000 0.785156 -0.408203
+v 0.060059 0.813477 -0.395508
+v -0.036621 0.739258 -0.448730
+v -0.060059 0.813477 -0.395508
+v 0.204590 0.777344 -0.446289
+v 0.226562 0.803223 -0.529785
+v 0.135742 0.806152 -0.425293
+v -0.226562 0.803223 -0.529785
+v -0.204590 0.777344 -0.446289
+v -0.135742 0.806152 -0.425293
+v 0.287109 0.763672 -0.486328
+v 0.322754 0.787109 -0.548340
+v -0.322754 0.787109 -0.548340
+v -0.287109 0.763672 -0.486328
+v 0.445801 0.753906 -0.488281
+v 0.378418 0.745605 -0.468750
+v -0.445801 0.753906 -0.488281
+v -0.378418 0.745605 -0.468750
+v 0.624023 0.697754 -0.399414
+v 0.518555 0.705566 -0.411621
+v -0.624023 0.697754 -0.399414
+v -0.518555 0.705566 -0.411621
+v 0.683594 0.654297 -0.325684
+v 0.626953 0.665039 -0.341309
+v -0.683594 0.654297 -0.325684
+v -0.626953 0.665039 -0.341309
+v 0.662598 0.631348 -0.195801
+v 0.639160 0.650391 -0.248047
+v -0.662598 0.631348 -0.195801
+v -0.639160 0.650391 -0.248047
+v 0.548828 0.650391 -0.066406
+v 0.568848 0.659180 -0.128418
+v -0.548828 0.650391 -0.066406
+v -0.568848 0.659180 -0.128418
+v 0.379883 0.693848 0.004883
+v 0.441895 0.687988 -0.040039
+v -0.379883 0.693848 0.004883
+v -0.441895 0.687988 -0.040039
+v 0.181641 0.761230 -0.006836
+v 0.287109 0.729980 -0.042481
+v -0.181641 0.761230 -0.006836
+v -0.287109 0.729980 -0.042481
+v 0.171387 0.752930 -0.101074
+v 0.090332 0.746094 -0.096191
+v 0.076172 0.763184 0.023926
+v -0.090332 0.746094 -0.096191
+v -0.171387 0.752930 -0.101074
+v -0.076172 0.763184 0.023926
+v 0.071777 0.791016 -0.325195
+v 0.139160 0.778809 -0.360352
+v -0.139160 0.778809 -0.360352
+v -0.071777 0.791016 -0.325195
+v 0.000000 0.785156 -0.275391
+v 0.067871 0.762695 -0.210938
+v 0.118652 0.768066 -0.260742
+v -0.118652 0.768066 -0.260742
+v -0.067871 0.762695 -0.210938
+v 0.133789 0.755859 -0.171387
+v 0.000000 0.748047 -0.140625
+v -0.133789 0.755859 -0.171387
+v 0.036621 0.684082 0.891113
+v 0.000000 0.664063 0.915039
+v 0.106934 0.665039 0.903809
+v -0.036621 0.684082 0.891113
+v -0.106934 0.665039 0.903809
+v 0.101074 0.693848 0.865234
+v 0.169434 0.674316 0.865723
+v -0.101074 0.693848 0.865234
+v -0.169434 0.674316 0.865723
+v 0.127930 0.712891 0.789062
+v 0.185547 0.697266 0.773437
+v -0.127930 0.712891 0.789062
+v -0.185547 0.697266 0.773437
+v 0.147949 0.727539 0.458496
+v 0.102051 0.736816 0.566894
+v 0.179199 0.711914 0.673340
+v -0.102051 0.736816 0.566894
+v -0.147949 0.727539 0.458496
+v -0.179199 0.711914 0.673340
+v 0.117188 0.727051 0.712891
+v -0.117188 0.727051 0.712891
+v 0.042969 0.748047 0.324219
+v 0.000000 0.746094 0.381836
+v 0.041992 0.747070 0.458008
+v 0.085938 0.741699 0.371094
+v -0.042969 0.748047 0.324219
+v -0.085938 0.741699 0.371094
+v -0.041992 0.747070 0.458008
+v 0.000000 0.742188 0.563477
+v 0.055664 0.736328 0.661133
+v -0.055664 0.736328 0.661133
+v 0.054199 0.732910 0.736816
+v 0.000000 0.734375 0.717773
+v -0.054199 0.732910 0.736816
+v 0.121094 0.770508 0.222656
+v 0.109863 0.787109 0.249512
+v 0.083496 0.763184 0.279785
+v 0.114746 0.747070 0.259277
+v -0.109863 0.787109 0.249512
+v -0.121094 0.770508 0.222656
+v -0.114746 0.747070 0.259277
+v -0.083496 0.763184 0.279785
+v 0.097656 0.763184 0.150391
+v 0.117676 0.787598 0.182129
+v 0.118164 0.753418 0.184570
+v -0.117676 0.787598 0.182129
+v -0.097656 0.763184 0.150391
+v -0.118164 0.753418 0.184570
+v 0.027832 0.763184 0.141113
+v 0.070801 0.780273 0.133789
+v 0.055176 0.750488 0.127930
+v -0.070801 0.780273 0.133789
+v -0.027832 0.763184 0.141113
+v -0.055176 0.750488 0.127930
+v 0.000000 0.770508 0.176758
+v 0.017578 0.787598 0.160156
+v 0.000000 0.756836 0.165039
+v -0.017578 0.787598 0.160156
+v 0.045410 0.779297 0.294922
+v 0.000000 0.761719 0.313477
+v -0.045410 0.779297 0.294922
+v 0.079590 0.795410 0.262695
+v 0.041992 0.804688 0.266113
+v 0.000000 0.792969 0.293945
+v -0.079590 0.795410 0.262695
+v -0.041992 0.804688 0.266113
+v 0.000000 0.808594 0.180664
+v 0.032715 0.816406 0.175293
+v 0.044922 0.798828 0.145020
+v -0.032715 0.816406 0.175293
+v -0.044922 0.798828 0.145020
+v 0.068848 0.810547 0.157227
+v 0.096680 0.798828 0.153809
+v -0.068848 0.810547 0.157227
+v -0.096680 0.798828 0.153809
+v 0.094238 0.816406 0.187988
+v 0.114258 0.808105 0.220703
+v -0.094238 0.816406 0.187988
+v -0.114258 0.808105 0.220703
+v 0.084473 0.812988 0.240723
+v -0.084473 0.812988 0.240723
+v 0.054688 0.823242 0.213867
+v -0.054688 0.823242 0.213867
+v 0.000000 0.816406 0.244141
+v 0.103027 0.766113 0.128906
+v 0.000000 0.745117 0.066406
+v -0.103027 0.766113 0.128906
+v 0.139160 0.735840 0.229004
+v 0.149902 0.734375 0.179687
+v -0.139160 0.735840 0.229004
+v -0.149902 0.734375 0.179687
+v 0.135742 0.727539 0.310547
+v 0.172852 0.695801 0.275391
+v -0.135742 0.727539 0.310547
+v -0.172852 0.695801 0.275391
+v 0.192383 0.696777 0.376953
+v -0.192383 0.696777 0.376953
+v 0.266602 0.562988 0.368164
+v 0.221680 0.633789 0.320312
+v -0.221680 0.633789 0.320312
+v -0.266602 0.562988 0.368164
+v 0.232910 0.561035 0.277344
+v 0.197266 0.639648 0.241699
+v -0.197266 0.639648 0.241699
+v -0.232910 0.561035 0.277344
+v 0.208008 0.574707 0.210449
+v -0.208008 0.574707 0.210449
+v 0.000000 0.727539 0.759766
+v 0.047852 0.716309 0.756836
+v 0.089355 0.727539 0.747559
+v -0.089355 0.727539 0.747559
+v -0.047852 0.716309 0.756836
+v 0.096191 0.710938 0.780762
+v 0.098633 0.710938 0.821777
+v -0.098633 0.710938 0.821777
+v -0.096191 0.710938 0.780762
+v 0.072754 0.691895 0.844238
+v 0.054199 0.693359 0.870117
+v -0.054199 0.693359 0.870117
+v -0.072754 0.691895 0.844238
+v 0.024414 0.681152 0.871094
+v 0.000000 0.688477 0.880859
+v -0.024414 0.681152 0.871094
+v 0.046875 0.662109 0.854980
+v 0.026367 0.643066 0.846191
+v 0.000000 0.660156 0.865234
+v -0.046875 0.662109 0.854980
+v -0.026367 0.643066 0.846191
+v 0.087891 0.676270 0.812988
+v 0.072266 0.646810 0.826660
+v -0.087891 0.676270 0.812988
+v -0.072266 0.646810 0.826660
+v 0.082031 0.691895 0.758789
+v 0.089844 0.659017 0.787109
+v -0.082031 0.691895 0.758789
+v -0.089844 0.659017 0.787109
+v 0.000000 0.689453 0.769531
+v 0.043945 0.664551 0.775879
+v -0.043945 0.664551 0.775879
+v 0.000000 0.645508 0.815430
+v 0.063477 0.647298 0.804199
+v -0.063477 0.647298 0.804199
+v 0.177734 0.762695 -0.150879
+v 0.178223 0.770996 -0.187500
+v 0.155273 0.769043 -0.217285
+v -0.177734 0.762695 -0.150879
+v -0.155273 0.769043 -0.217285
+v -0.178223 0.770996 -0.187500
+v 0.172363 0.775391 -0.258301
+v 0.156738 0.773438 -0.301758
+v -0.156738 0.773438 -0.301758
+v -0.172363 0.775391 -0.258301
+v 0.191406 0.776855 -0.337891
+v 0.192383 0.775391 -0.389160
+v -0.192383 0.775391 -0.389160
+v -0.191406 0.776855 -0.337891
+v 0.229980 0.756836 -0.099609
+v 0.206055 0.770508 -0.132813
+v -0.229980 0.756836 -0.099609
+v -0.206055 0.770508 -0.132813
+v 0.368652 0.724121 -0.052246
+v 0.300293 0.754395 -0.084473
+v -0.368652 0.724121 -0.052246
+v -0.300293 0.754395 -0.084473
+v 0.485352 0.694824 -0.090332
+v 0.425781 0.723145 -0.079102
+v -0.485352 0.694824 -0.090332
+v -0.425781 0.723145 -0.079102
+v 0.588379 0.668457 -0.190430
+v 0.528320 0.692871 -0.147461
+v -0.588379 0.668457 -0.190430
+v -0.528320 0.692871 -0.147461
+v 0.607910 0.668945 -0.289063
+v 0.584473 0.677734 -0.242676
+v -0.607910 0.668945 -0.289063
+v -0.584473 0.677734 -0.242676
+v 0.566406 0.686523 -0.361328
+v 0.576172 0.685059 -0.320801
+v -0.566406 0.686523 -0.361328
+v -0.576172 0.685059 -0.320801
+v 0.433594 0.738281 -0.415527
+v 0.492676 0.726562 -0.377441
+v -0.433594 0.738281 -0.415527
+v -0.492676 0.726562 -0.377441
+v 0.334961 0.751465 -0.447754
+v 0.378418 0.759277 -0.417480
+v -0.334961 0.751465 -0.447754
+v -0.378418 0.759277 -0.417480
+v 0.261230 0.765137 -0.439941
+v 0.303223 0.762695 -0.428711
+v -0.261230 0.765137 -0.439941
+v -0.303223 0.762695 -0.428711
+v 0.239746 0.773926 -0.401367
+v -0.239746 0.773926 -0.401367
+v 0.225098 0.769531 -0.363770
+v 0.257812 0.761719 -0.378906
+v 0.277832 0.767578 -0.405762
+v -0.225098 0.769531 -0.363770
+v -0.277832 0.767578 -0.405762
+v -0.257812 0.761719 -0.378906
+v 0.308594 0.757812 -0.402344
+v 0.338867 0.756836 -0.414063
+v -0.338867 0.756836 -0.414063
+v -0.308594 0.757812 -0.402344
+v 0.375000 0.750000 -0.398438
+v 0.423828 0.751465 -0.391113
+v -0.423828 0.751465 -0.391113
+v -0.375000 0.750000 -0.398438
+v 0.472656 0.714844 -0.363281
+v 0.533691 0.695801 -0.342773
+v -0.533691 0.695801 -0.342773
+v -0.472656 0.714844 -0.363281
+v 0.542969 0.675781 -0.308594
+v 0.566406 0.680176 -0.282227
+v -0.566406 0.680176 -0.282227
+v -0.542969 0.675781 -0.308594
+v 0.550781 0.671875 -0.246094
+v 0.551758 0.680664 -0.201660
+v -0.551758 0.680664 -0.201660
+v -0.550781 0.671875 -0.246094
+v 0.503906 0.687500 -0.164063
+v 0.468750 0.709473 -0.116699
+v -0.468750 0.709473 -0.116699
+v -0.503906 0.687500 -0.164063
+v 0.417969 0.714844 -0.101563
+v 0.369141 0.735840 -0.083984
+v -0.369141 0.735840 -0.083984
+v -0.417969 0.714844 -0.101563
+v 0.308594 0.742188 -0.105469
+v 0.247070 0.764160 -0.117676
+v -0.247070 0.764160 -0.117676
+v -0.308594 0.742188 -0.105469
+v 0.222656 0.753906 -0.148438
+v 0.198730 0.763184 -0.165527
+v -0.198730 0.763184 -0.165527
+v -0.222656 0.753906 -0.148438
+v 0.191406 0.769043 -0.296387
+v 0.214844 0.757812 -0.328125
+v -0.191406 0.769043 -0.296387
+v -0.214844 0.757812 -0.328125
+v 0.185547 0.765625 -0.224609
+v 0.195312 0.753906 -0.261719
+v -0.185547 0.765625 -0.224609
+v -0.195312 0.753906 -0.261719
+v 0.199219 0.750000 -0.199219
+v -0.199219 0.750000 -0.199219
+v 0.086426 0.679688 -0.496094
+v 0.047201 0.620117 -0.448405
+v 0.000000 0.673828 -0.432617
+v -0.086426 0.679688 -0.496094
+v -0.047201 0.620117 -0.448405
+v 0.183594 0.683594 -0.668457
+v 0.179199 0.625977 -0.575195
+v -0.183594 0.683594 -0.668457
+v -0.179199 0.625977 -0.575195
+v 0.329102 0.661621 -0.700684
+v 0.266113 0.620117 -0.662598
+v -0.329102 0.661621 -0.700684
+v -0.266113 0.620117 -0.662598
+v 0.494141 0.618652 -0.582520
+v 0.377441 0.596191 -0.621094
+v -0.494141 0.618652 -0.582520
+v -0.377441 0.596191 -0.621094
+v 0.686035 0.562500 -0.476074
+v 0.580078 0.519043 -0.506836
+v -0.686035 0.562500 -0.476074
+v -0.580078 0.519043 -0.506836
+v 0.808105 0.516602 -0.391602
+v 0.736816 0.472168 -0.433105
+v -0.808105 0.516602 -0.391602
+v -0.736816 0.472168 -0.433105
+v 0.781250 0.433105 -0.166992
+v 0.792969 0.402832 -0.290039
+v -0.781250 0.433105 -0.166992
+v -0.792969 0.402832 -0.290039
+v 0.617676 0.471191 0.009766
+v 0.706055 0.365234 -0.080078
+v -0.617676 0.471191 0.009766
+v -0.706055 0.365234 -0.080078
+v 0.430664 0.500977 0.112793
+v 0.527832 0.411621 0.060059
+v -0.430664 0.500977 0.112793
+v -0.527832 0.411621 0.060059
+v 0.000000 0.302734 0.514648
+v 0.088379 0.266602 0.459473
+v 0.144531 0.318848 0.476562
+v 0.066895 0.333008 0.569824
+v -0.088379 0.266602 0.459473
+v -0.066895 0.333008 0.569824
+v -0.144531 0.318848 0.476562
+v 0.000000 0.339844 0.677734
+v 0.133301 0.362305 0.647949
+v 0.070801 0.365234 0.775391
+v -0.070801 0.365234 0.775391
+v -0.133301 0.362305 0.647949
+v 0.000000 0.402344 0.880859
+v 0.152832 0.400879 0.851562
+v 0.081543 0.452148 0.940430
+v -0.081543 0.452148 0.940430
+v -0.152832 0.400879 0.851562
+v 0.000000 0.513672 0.974609
+v 0.169922 0.494629 0.956543
+v -0.169922 0.494629 0.956543
+v 0.243164 0.427734 0.908691
+v 0.308594 0.464844 0.916992
+v -0.308594 0.464844 0.916992
+v -0.243164 0.427734 0.908691
+v 0.293945 0.409180 0.830566
+v 0.324707 0.460449 0.791504
+v -0.324707 0.460449 0.791504
+v -0.293945 0.409180 0.830566
+v 0.263672 0.404297 0.634277
+v 0.300781 0.478516 0.597656
+v -0.300781 0.478516 0.597656
+v -0.263672 0.404297 0.634277
+v 0.215332 0.380371 0.731934
+v 0.193359 0.369629 0.529297
+v -0.215332 0.380371 0.731934
+v -0.193359 0.369629 0.529297
+v 0.242188 0.408691 0.449707
+v 0.205566 0.333008 0.394043
+v -0.242188 0.408691 0.449707
+v -0.205566 0.333008 0.394043
+v 0.272461 0.487793 0.407715
+v -0.272461 0.487793 0.407715
+v 0.240723 0.494141 0.301758
+v 0.244629 0.444824 0.242187
+v 0.222168 0.511719 0.238281
+v -0.244629 0.444824 0.242187
+v -0.240723 0.494141 0.301758
+v -0.222168 0.511719 0.238281
+v 0.229980 0.410156 0.334473
+v -0.229980 0.410156 0.334473
+v 0.227702 0.492350 0.192871
+v 0.234863 0.524902 0.179199
+v -0.234863 0.524902 0.179199
+v -0.227702 0.492350 0.192871
+v 0.311198 0.490885 0.144531
+v -0.311198 0.490885 0.144531
+v 0.176270 -0.732422 -0.087891
+v 0.309408 -0.615560 0.042969
+v 0.168457 -0.585938 0.164551
+v 0.000000 -0.712891 0.058594
+v -0.309408 -0.615560 0.042969
+v -0.176270 -0.732422 -0.087891
+v -0.168457 -0.585938 0.164551
+v 0.297363 -0.413086 0.219727
+v 0.145996 -0.285156 0.335449
+v 0.000000 -0.484375 0.274414
+v -0.297363 -0.413086 0.219727
+v -0.145996 -0.285156 0.335449
+v 0.242676 -0.052246 0.339355
+v 0.108887 0.126953 0.418945
+v 0.000000 -0.074219 0.404297
+v -0.242676 -0.052246 0.339355
+v -0.108887 0.126953 0.418945
+v 0.174805 0.239746 0.400391
+v 0.000000 0.228516 0.455078
+v -0.174805 0.239746 0.400391
+v 0.229818 0.288900 0.328125
+v -0.229818 0.288900 0.328125
+v 0.655273 0.247070 0.009277
+v 0.779785 0.088867 -0.100586
+v 0.788086 0.241211 -0.197266
+v -0.655273 0.247070 0.009277
+v -0.788086 0.241211 -0.197266
+v -0.779785 0.088867 -0.100586
+v 0.222168 -0.734375 -0.493164
+v 0.367676 -0.688477 -0.246094
+v 0.000000 -0.800781 -0.298828
+v -0.367676 -0.688477 -0.246094
+v -0.222168 -0.734375 -0.493164
+v 0.227051 0.249512 -0.844238
+v 0.419922 0.065918 -0.876465
+v 0.226562 -0.081055 -0.937500
+v 0.000000 0.099609 -0.928711
+v -0.419922 0.065918 -0.876465
+v -0.227051 0.249512 -0.844238
+v -0.226562 -0.081055 -0.937500