<gh_stars>0
import vtk

# define source
cone1 = vtk.vtkConeSource()
cone1.SetHeight(5.0)
cone1.SetRadius(2.0)
cone1.SetResolution(10)

# define mapper
# rendering technique
coneMapper = vtk.vtkPolyDataMapper()
coneMapper.SetInputConnection(cone1.GetOutputPort())

# define actor
# entity in 3D scene
coneActor = vtk.vtkActor()
coneActor.SetMapper(coneMapper)

cone2 = vtk.vtkConeSource()
cone2.SetHeight(3.0)
cone2.SetRadius(2.0)
cone2.SetResolution(5)

coneMapper2 = vtk.vtkPolyDataMapper()
coneMapper2.SetInputConnection(cone2.GetOutputPort())

coneActor2 = vtk.vtkActor()
coneActor2.SetMapper(coneMapper2)

# position and orientation
cone2.SetCenter(-2, 0, 0)
cone1.SetCenter(2, 0, 0)
cone1.SetDirection((0.0, 1.0, 0.0))
cone2.SetDirection((0.0, 1.0, 0.0))

# define renderer
# 3D scene
ren = vtk.vtkRenderer()
ren.AddActor(coneActor)
ren.AddActor(coneActor2)
ren.SetBackground(0.2, 0.3, 0.1)

# define rendering window
window = vtk.vtkRenderWindow()
window.AddRenderer(ren)
window.SetSize(480, 480)

# define interactor
interactor = vtk.vtkRenderWindowInteractor()
interactor.SetRenderWindow(window)
interactor.Initialize()
interactor.Start()
