Difference between revisions of "CGO Text"

From PyMOLWiki
Jump to: navigation, search
m (Reverted edit of 2chemp, changed back to last version by Inchoate)
Line 23: Line 23:
  
 
[[Category:Script_Library]]
 
[[Category:Script_Library]]
 +
[[Category:Math_Scripts]]

Revision as of 08:50, 30 April 2009

CGO Text Example from following example
# draw text using cgo
from pymol import cmd
from pymol.cgo import *
from pymol.vfont import plain

cgo = []

axes = [[2.0,0.0,0.0],[0.0,2.0,0.0],[0.0,0.0,2.0]]

pos = [0.0,0.0,0.0]
wire_text(cgo,plain,pos,'Hello World',axes)

pos = [0.0,-3.0,0.0]
cyl_text(cgo,plain,pos,'Hello Universe',0.10,axes=axes)

cmd.set("cgo_line_radius",0.03)
cmd.load_cgo(cgo,'txt')
cmd.zoom("all",2.0)