[vtkusers] Question about surface normal

David Doria daviddoria+vtk at gmail.com
Thu Nov 5 10:28:52 EST 2009


On Thu, Nov 5, 2009 at 10:23 AM, Luca Pamparana
<luca.pamparana at gmail.com> wrote:
> Hi David,
>
> Yes, the user point that I talk about would lie outside the plane, of course.
>
> So, basically what I have is a series of planes in my 3D scene all
> around a point in my 3D world and what I want to achieve is create
> these planes with the explicit normals pointing towards this point.
>
> Cheers,
>
> Luca

I recommend you visualize your special point, the current polygon, the
vector from the center of mass of your current polygon to the special
point (using a vtkLine), the current polygon's normal (again a vtkLine
through the center of mass of the polygon), the new polygon, the new
polygon's normal, and the vector from the center of mass of the new
polygon to the special point.

These things should help you debug if it is working. Send us your
compilable code if you have any problems.

Thanks,

David



More information about the vtkusers mailing list