[vtkusers] Build a parallelepiped from 4 points ?

David Doria daviddoria+vtk at gmail.com
Tue Jan 19 07:38:32 EST 2010


On Tue, Jan 19, 2010 at 6:39 AM, dsdfdff sfdsf
<steve.harris18 at hotmail.com> wrote:
> Hello everybody,
>
> I'm a new vtk's user and I'm trying to do some basics stuff...
>
> I was wondering how can I build a parallelepiped (using vtkPolyData) from 4
> 2d points ? (or better from 4 planes)
>
>
> I had a quick look on google and if I understood correctly I have to user
> vtkPoints and vtkDataArray. But to be honest
> I haven't understood how they work..
>
>
> Any help would be appreciated
>
> Regards,
> Steve

Hi Steve,

Welcome to VTK!

We have recently compiled a large set of examples on the wiki. They
may help you get started:
http://www.cmake.org/Wiki/VTK/Examples

To answer your question, you can build up your object manually using
quads following this example:
http://www.vtk.org/Wiki/VTK/Examples/GeometricObjects/Quad

Another choice would be to make a cube:
http://www.vtk.org/Wiki/VTK/Examples/GeometricObjects/Cube

and create a shear transform and apply it to the cube:
http://www.vtk.org/Wiki/VTK/Examples/TransformPolyData

Hope this helps get you started - let us know if you have any further questions!

Thanks,

David



More information about the vtkusers mailing list