print 'translateional matrix:', m.inv() print 'invert translateional matrix:', m print 'lattice reper', r print 'sublattice reper', sr vo = Voron(*r) vos = Voron(*sr) drawgl(vo) drawgl(vos) drawipe(vo) drawipe(vos) drawgl(sr[0], style='line') drawgl(sr[1], style='line') drawgl(sr[2], style='line') ## button for output camera angles and distance def pinfo(some): print drawgl.gl.alpha, drawgl.gl.theta, drawgl.gl.dist drawgl.button('camera info', pinfo) ## save picture to ipe file import math drawipe.setup(24.0 * math.pi / 180, 128.0 * math.pi / 180, 27.207602388) #drawipe.setup( -13.0 * math.pi / 180, +65.0 * math.pi / 180, 15.559717968 ) drawipe.save('/tmp/test4.ipe') drawgl.start()
vo = Voron(*r) vos = Voron(*sr) drawgl(vo) drawgl(vos) drawipe(vo) drawipe(vos) drawgl(sr[0], style='line') drawgl(sr[1], style='line') drawgl(sr[2], style='line') ## additional testing for conversion of cubic sublattice to volume-centered... m_vc = Mat(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.5, 0.5, 0.5) print mv * m_vc.inv() ## button for output camera angles and distance def pinfo(some): print drawgl.gl.alpha, drawgl.gl.theta, drawgl.gl.dist drawgl.button('camera info', pinfo) import math drawipe.setup(-13.0 * math.pi / 180, +65.0 * math.pi / 180, 15.559717968) drawipe.save('/tmp/test3.ipe') drawgl.gl.alpha, drawgl.gl.theta, drawgl.gl.dist = -65.0, 13.0, 15.559717968 ## beauty parameters drawgl.start()
drawgl( vo ) drawgl( vos ) drawipe( vo ) drawipe( vos ) drawgl( sr[ 0 ], style = 'line' ) drawgl( sr[ 1 ], style = 'line' ) drawgl( sr[ 2 ], style = 'line' ) ## additional testing for conversion of cubic sublattice to volume-centered... m_vc = Mat( 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.5, 0.5, 0.5 ) print mv * m_vc.inv() ## button for output camera angles and distance def pinfo( some ): print drawgl.gl.alpha, drawgl.gl.theta, drawgl.gl.dist drawgl.button( 'camera info', pinfo ) import math drawipe.setup( -13.0 * math.pi / 180, +65.0 * math.pi / 180, 15.559717968 ) drawipe.save( '/tmp/test3.ipe' ) drawgl.gl.alpha, drawgl.gl.theta, drawgl.gl.dist = -65.0, 13.0, 15.559717968 ## beauty parameters drawgl.start()
print 'translateional matrix:', m.inv() print 'invert translateional matrix:', m print 'lattice reper', r print 'sublattice reper', sr vo = Voron( *r ) vos = Voron( *sr ) drawgl( vo ) drawgl( vos ) drawipe( vo ) drawipe( vos ) drawgl( sr[ 0 ], style = 'line' ) drawgl( sr[ 1 ], style = 'line' ) drawgl( sr[ 2 ], style = 'line' ) ## button for output camera angles and distance def pinfo( some ): print drawgl.gl.alpha, drawgl.gl.theta, drawgl.gl.dist drawgl.button( 'camera info', pinfo ) ## save picture to ipe file import math drawipe.setup( 24.0 * math.pi / 180, 128.0 * math.pi / 180, 27.207602388 ) #drawipe.setup( -13.0 * math.pi / 180, +65.0 * math.pi / 180, 15.559717968 ) drawipe.save( '/tmp/test4.ipe' ) drawgl.start()
from vec import * from mat import * from zell import * from voron import * from reper import * import zell2reper ## drawing import vec_gl import voron_gl from draw_gl import drawgl from draw_ipe import drawipe r = Zell(-1, -0, -1, -1, -2, -1).to_reper() print r vo = Voron(*r) drawgl(vo) drawgl.start() drawipe.setup(0, 0.2, 30) for x in xrange(5 + 1): r = Zell(-1, -0, -1, -1, -2 + 0.4 * x, -1).to_reper() print r vo = Voron(*r) drawipe.group() ## add each dirichlet cell to new group drawipe(vo) drawipe.save('/tmp/Q2_to_K3.ipe')
from zell import * from voron import * from reper import * import zell2reper ## drawing import vec_gl import voron_gl from draw_gl import drawgl from draw_ipe import drawipe r = Zell( -1, -0, -1, -1, -2, -1 ).to_reper() print r vo = Voron( *r ) drawgl( vo ) drawgl.start() drawipe.setup( 0, 0.2, 30 ) for x in xrange( 5 + 1 ): r = Zell( -1, -0, -1, -1, -2 + 0.4 * x, -1 ).to_reper() print r vo = Voron( *r ) drawipe.group() ## add each dirichlet cell to new group drawipe( vo ) drawipe.save( '/tmp/Q2_to_K3.ipe' )