<s> import vtk <EOL> sphere = vtk . vtkSphereSource ( ) <EOL> cone = vtk . vtkConeSource ( ) <EOL> glyph = vtk . vtkGlyph3D ( ) <EOL> glyph . SetInputConnection ( sphere . GetOutputPort ( ) ) <EOL> glyph . SetSource ( cone . GetOutput ( ) ) <EOL> glyph . SetVectorModeToUseNormal ( ) <EOL> glyph . SetScaleModeToScaleByVector ( ) <EOL> glyph . SetScaleFactor ( <NUM_LIT> ) <EOL> appendData = vtk . vtkAppendPolyData ( ) <EOL> appendData . AddInput ( glyph . GetOutput ( ) ) <EOL> appendData . AddInput ( sphere . GetOutput ( ) ) <EOL> maceMapper = vtk . vtkPolyDataMapper ( ) <EOL> maceMapper . SetInputConnection ( appendData . GetOutputPort ( ) ) <EOL> maceActor = vtk . vtkLODActor ( ) <EOL> maceActor . SetMapper ( maceMapper ) <EOL> maceActor . VisibilityOn ( ) <EOL> ren = vtk . vtkRenderer ( ) <EOL> renWin = vtk . vtkRenderWindow ( ) <EOL> renWin . AddRenderer ( ren ) <EOL> iren = vtk . vtkRenderWindowInteractor ( ) <EOL> iren . SetRenderWindow ( renWin ) <EOL> boxWidget = vtk . vtkBoxWidget ( ) <EOL> boxWidget . SetInteractor ( iren ) <EOL> boxWidget . SetPlaceFactor ( <NUM_LIT> ) <EOL> ren . AddActor ( maceActor ) <EOL> ren . SetBackground ( <NUM_LIT:0.1> , <NUM_LIT> , <NUM_LIT> ) <EOL> renWin . SetSize ( <NUM_LIT> , <NUM_LIT> ) <EOL> t = vtk . vtkTransform ( ) <EOL> def TransformActor ( obj , event ) : <EOL> global t , maceActor <EOL> obj . GetTransform ( t ) <EOL> maceActor . SetUserTransform ( t ) <EOL> boxWidget . SetProp3D ( maceActor ) <EOL> boxWidget . PlaceWidget ( ) <EOL> boxWidget . AddObserver ( "<STR_LIT>" , TransformActor ) <EOL> iren . Initialize ( ) <EOL> renWin . Render ( ) <EOL> iren . Start ( ) </s>
