Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 82ac505190c212a37e5a9f824939c992 > files > 464

vtk-examples-6.0.0-8.mga5.i586.rpm

from vtk import *

graph = vtkMutableDirectedGraph()
a = graph.AddVertex()
b = graph.AddChild(a)
c = graph.AddChild(a)
d = graph.AddChild(b)
e = graph.AddChild(c)
f = graph.AddChild(c)

tree = vtkTree()
tree.CheckedShallowCopy(graph)

view = vtkGraphLayoutView()
view.AddRepresentationFromInput(tree)

view.GetRenderWindow().SetSize(600, 600)
view.ResetCamera()
view.Render()
view.GetInteractor().Start()