<s> import vtk <EOL> from vtk . util . misc import vtkGetDataRoot <EOL> VTK_DATA_ROOT = vtkGetDataRoot ( ) <EOL> pl3d = vtk . vtkPLOT3DReader ( ) <EOL> pl3d . SetXYZFileName ( VTK_DATA_ROOT + "<STR_LIT>" ) <EOL> pl3d . SetQFileName ( VTK_DATA_ROOT + "<STR_LIT>" ) <EOL> pl3d . SetScalarFunctionNumber ( <NUM_LIT:100> ) <EOL> pl3d . SetVectorFunctionNumber ( <NUM_LIT> ) <EOL> pl3d . Update ( ) <EOL> plane = vtk . vtkPlaneSource ( ) <EOL> plane . SetResolution ( <NUM_LIT:50> , <NUM_LIT:50> ) <EOL> transP1 = vtk . vtkTransform ( ) <EOL> transP1 . Translate ( <NUM_LIT> , <NUM_LIT:0.0> , <NUM_LIT> ) <EOL> transP1 . Scale ( <NUM_LIT:5> , <NUM_LIT:5> , <NUM_LIT:5> ) <EOL> transP1 . RotateY ( <NUM_LIT> ) <EOL> tpd1 = vtk . vtkTransformPolyDataFilter ( ) <EOL> tpd1 . SetInputConnection ( plane . GetOutputPort ( ) ) <EOL> tpd1 . SetTransform ( transP1 ) <EOL> outTpd1 = vtk . vtkOutlineFilter ( ) <EOL> outTpd1 . SetInputConnection ( tpd1 . GetOutputPort ( ) ) <EOL> mapTpd1 = vtk . vtkPolyDataMapper ( ) <EOL> mapTpd1 . SetInputConnection ( outTpd1 . GetOutputPort ( ) ) <EOL> tpd1Actor = vtk . vtkActor ( ) <EOL> tpd1Actor . SetMapper ( mapTpd1 ) <EOL> tpd1Actor . GetProperty ( ) . SetColor ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> ) <EOL> transP2 = vtk . vtkTransform ( ) <EOL> transP2 . Translate ( <NUM_LIT> , <NUM_LIT:0.0> , <NUM_LIT> ) <EOL> transP2 . Scale ( <NUM_LIT:5> , <NUM_LIT:5> , <NUM_LIT:5> ) <EOL> transP2 . RotateY ( <NUM_LIT> ) <EOL> tpd2 = vtk . vtkTransformPolyDataFilter ( ) <EOL> tpd2 . SetInputConnection ( plane . GetOutputPort ( ) ) <EOL> tpd2 . SetTransform ( transP2 ) <EOL> outTpd2 = vtk . vtkOutlineFilter ( ) <EOL> outTpd2 . SetInputConnection ( tpd2 . GetOutputPort ( ) ) <EOL> mapTpd2 = vtk . vtkPolyDataMapper ( ) <EOL> mapTpd2 . SetInputConnection ( outTpd2 . GetOutputPort ( ) ) <EOL> tpd2Actor = vtk . vtkActor ( ) <EOL> tpd2Actor . SetMapper ( mapTpd2 ) <EOL> tpd2Actor . GetProperty ( ) . SetColor ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> ) <EOL> transP3 = vtk . vtkTransform ( ) <EOL> transP3 . Translate ( <NUM_LIT> , <NUM_LIT:0.0> , <NUM_LIT> ) <EOL> transP3 . Scale ( <NUM_LIT:5> , <NUM_LIT:5> , <NUM_LIT:5> ) <EOL> transP3 . RotateY ( <NUM_LIT> ) <EOL> tpd3 = vtk . vtkTransformPolyDataFilter ( ) <EOL> tpd3 . SetInputConnection ( plane . GetOutputPort ( ) ) <EOL> tpd3 . SetTransform ( transP3 ) <EOL> outTpd3 = vtk . vtkOutlineFilter ( ) <EOL> outTpd3 . SetInputConnection ( tpd3 . GetOutputPort ( ) ) <EOL> mapTpd3 = vtk . vtkPolyDataMapper ( ) <EOL> mapTpd3 . SetInputConnection ( outTpd3 . GetOutputPort ( ) ) <EOL> tpd3Actor = vtk . vtkActor ( ) <EOL> tpd3Actor . SetMapper ( mapTpd3 ) <EOL> tpd3Actor . GetProperty ( ) . SetColor ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> ) <EOL> appendF = vtk . vtkAppendPolyData ( ) <EOL> appendF . AddInput ( tpd1 . GetOutput ( ) ) <EOL> appendF . AddInput ( tpd2 . GetOutput ( ) ) <EOL> appendF . AddInput ( tpd3 . GetOutput ( ) ) <EOL> probe = vtk . vtkProbeFilter ( ) <EOL> probe . SetInputConnection ( appendF . GetOutputPort ( ) ) <EOL> probe . SetSource ( pl3d . GetOutput ( ) ) <EOL> contour = vtk . vtkContourFilter ( ) <EOL> contour . SetInputConnection ( probe . GetOutputPort ( ) ) <EOL> contour . GenerateValues ( <NUM_LIT:50> , pl3d . GetOutput ( ) . GetScalarRange ( ) ) <EOL> contourMapper = vtk . vtkPolyDataMapper ( ) <EOL> contourMapper . SetInputConnection ( contour . GetOutputPort ( ) ) <EOL> contourMapper . SetScalarRange ( pl3d . GetOutput ( ) . GetScalarRange ( ) ) <EOL> planeActor = vtk . vtkActor ( ) <EOL> planeActor . SetMapper ( contourMapper ) <EOL> outline = vtk . vtkStructuredGridOutlineFilter ( ) <EOL> outline . SetInputConnection ( pl3d . GetOutputPort ( ) ) <EOL> outlineMapper = vtk . vtkPolyDataMapper ( ) <EOL> outlineMapper . SetInputConnection ( outline . GetOutputPort ( ) ) <EOL> outlineActor = vtk . vtkActor ( ) <EOL> outlineActor . SetMapper ( outlineMapper ) <EOL> outlineActor . GetProperty ( ) . SetColor ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> ) <EOL> ren = vtk . vtkRenderer ( ) <EOL> renWin = vtk . vtkRenderWindow ( ) <EOL> renWin . AddRenderer ( ren ) <EOL> iren = vtk . vtkRenderWindowInteractor ( ) <EOL> iren . SetRenderWindow ( renWin ) <EOL> ren . AddActor ( outlineActor ) <EOL> ren . AddActor ( planeActor ) <EOL> ren . AddActor ( tpd1Actor ) <EOL> ren . AddActor ( tpd2Actor ) <EOL> ren . AddActor ( tpd3Actor ) <EOL> ren . SetBackground ( <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:1> ) <EOL> renWin . SetSize ( <NUM_LIT> , <NUM_LIT> ) <EOL> ren . ResetCamera ( ) <EOL> cam1 = ren . GetActiveCamera ( ) <EOL> cam1 . SetClippingRange ( <NUM_LIT> , <NUM_LIT:50> ) <EOL> cam1 . SetFocalPoint ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) <EOL> cam1 . SetPosition ( - <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) <EOL> cam1 . SetViewUp ( <NUM_LIT> , - <NUM_LIT> , <NUM_LIT> ) <EOL> iren . Initialize ( ) <EOL> renWin . Render ( ) <EOL> iren . Start ( ) </s>
