[vtkusers] illustrate a line

andre at ynic.york.ac.uk andre at ynic.york.ac.uk
Mon Jan 19 18:25:14 EST 2009


I find the vtkLineSource easiest to use when I am drawing a line that
passes between just two points:

rake = vtk.vtkLineSource()
rake.SetPoint1(15, -5, 32)
rake.SetPoint2(15, 5, 32)
rake.SetResolution(21)
rakeMapper = vtk.vtkPolyDataMapper()
rakeMapper.SetInputConnection(rake.GetOutputPort())
rakeActor = vtk.vtkActor()
rakeActor.SetMapper(rakeMapper)

(taken directly from the
/Examples/VisualizationAlgorithms/Python/streamSurface.py example at
http://www.vtk.org/doc/nightly/html/c2_vtk_e_3.html#c2_vtk_e_vtkLineSource)

It's probably not the best way .. but it works for me :)

> Hi all,
>
> what is the best way to illustrate a line between - given two space
> points?
> and what is a good way to represent points?
> i.e
> given (1,0,0) and (0,1,0) ==>
> vtkPython script illustrates  the line : (t,1-t,0)
>
> thank you!
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>






More information about the vtkusers mailing list