[vtkusers] Question about surface normal

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


On Thu, Nov 5, 2009 at 10:05 AM, Luca Pamparana
<luca.pamparana at gmail.com> wrote:
> Hi David,
>
> Thanks for your reply. So, if I have got it correct:
>
> - I can take vectors AC and BD and using the cross product find the
> current normal vector.
> - The normal vector I want would be described as user_specified_point
> - (any of my polygon points). Is this correct?
> - Then I could use your transformation function to transform the 4 points...
>
> If I was to use a vtkPlane object, would this be easier? In the
> example that you send me, the function specifies the center of the
> plane and the surface normal. Would the plane center be invariant
> under this transformation? I would have thought that if I was to
> specify a normal explicitly, the points would have to be
> recalculated....
>
> Sorry for the constant mailing. I hope this would be the final question!
>
> Thanks,
>
> Luca

I'm still not exactly sure what you are trying to achieve. If you find
UserPoint - (any polygon point), you will certainly get a different
vector in each case, so this is likely not what you want. I was indeed
trying to keep the polygon center invariant under the transformation -
that's why we moved the points center of mass to the origin before
applying the rotation. As you say, the points themselves will
certainly move.

Can you explain a bit more about what it is that you are actually
trying to accomplish?

Thanks,

David



More information about the vtkusers mailing list