"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "examples/devel/cgo_plane.py" between
pymol-v1.8.6.0.tar.bz2 and pymol-v2.1.0.tar.bz2

About: PyMOL is a Python-enhanced molecular graphics tool. It excels at 3D visualization of proteins, small molecules, density, surfaces, and trajectories. It also includes molecular editing, ray tracing, and movies. Open Source version.

cgo_plane.py  (pymol-v1.8.6.0.tar.bz2):cgo_plane.py  (pymol-v2.1.0.tar.bz2)
skipping to change at line 58 skipping to change at line 58
normal = [ 0.0, 0.0, 1.0 ] normal = [ 0.0, 0.0, 1.0 ]
# then transform plane coordinates into model space # then transform plane coordinates into model space
plane = map( lambda p,v=view: [ plane = map( lambda p,v=view: [
v[0] * p[0] + v[1] * p[1] + v[2]* p[2], v[0] * p[0] + v[1] * p[1] + v[2]* p[2],
v[3] * p[0] + v[4] * p[1] + v[5]* p[2], v[3] * p[0] + v[4] * p[1] + v[5]* p[2],
v[6] * p[0] + v[7] * p[1] + v[8]* p[2] v[6] * p[0] + v[7] * p[1] + v[8]* p[2]
], plane ) ], plane )
plane = list(plane)
normal = apply( lambda p,v=view:[ normal = ( lambda p,v=view:[
v[0] * p[0] + v[1] * p[1] + v[2]* p[2], v[0] * p[0] + v[1] * p[1] + v[2]* p[2],
v[3] * p[0] + v[4] * p[1] + v[5]* p[2], v[3] * p[0] + v[4] * p[1] + v[5]* p[2],
v[6] * p[0] + v[7] * p[1] + v[8]* p[2] v[6] * p[0] + v[7] * p[1] + v[8]* p[2]
], (normal,) ) ])(*(normal,))
# and position relative to the camera # and position relative to the camera
plane = map( lambda p,v=view: [ plane = map( lambda p,v=view: [
p[0] + v[9 ] + v[12], p[0] + v[9 ] + v[12],
p[1] + v[10] + v[13], p[1] + v[10] + v[13],
p[2] + + v[14], p[2] + + v[14],
], plane ) ], plane )
plane = list(plane)
# set color # set color
obj.extend( [ COLOR, 0.8, 0.8, 0.8 ] ) # greyish obj.extend( [ COLOR, 0.8, 0.8, 0.8 ] ) # greyish
# begin triangle strip # begin triangle strip
obj.extend( [ BEGIN, TRIANGLE_STRIP ] ) obj.extend( [ BEGIN, TRIANGLE_STRIP ] )
# set normal # set normal
obj.append( NORMAL ) obj.append( NORMAL )
 End of changes. 4 change blocks. 
2 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)