[vtkusers] angle between planes[newbie question]

David Gobbi david.gobbi at gmail.com
Sat Apr 9 15:10:23 EDT 2016


The angle in radians can be computed with the following:

    double angle = vtkMath::AngleBetweenVectors(normal1, normal2);

and the axis of rotation must be perpendicular to both normals, therefore
(if the planes are not parallel) the axis can be computed as follows:

    double axis[3];
    vtkMath::Cross(normal1, normal2, axis);
    vtkMath::Normalize(axis);

Is this the representation of the angle that you need?   I wasn't sure
what you meant by "angle X,Y,Z".

 - David


On Sat, Apr 9, 2016 at 12:31 PM, c_mihai via vtkusers <vtkusers at vtk.org>
wrote:

> Lets say I loaded two planes from vtkPlaneSource, they are defined by a
> center and a normal. How can I find the angle X,Y,Z between the two planes?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160409/e3a887d0/attachment.html>


More information about the vtkusers mailing list