epix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ePiX-devel] possible bug in plane#plane(P const&, P const&, P const


From: Andrew D. Hwang
Subject: Re: [ePiX-devel] possible bug in plane#plane(P const&, P const&, P const&)
Date: Thu, 6 Dec 2007 19:07:34 -0500 (EST)

On Thu, 6 Dec 2007, Maik Beckmann wrote:

The local variable perp in plane#plane(P const&, P const&, P const&), which is later assigned to m_perp and thus returned by plane#perp(), is calculated like this
 P perp((p3-p1)*(p2-p1));

I expected plane#perp() to return the normal vector of the plane, but the
preceding statement calculated the opposite direction (see attached pdf).
If this is intended its ok for me, since then plane#perp() returns a real
perpendicular :). Is it?

Hi Maik,

This definition is indeed the opposite of what I'd expect, namely, the points p1, p2, p3 "should" be oriented counterclockwise with respect to the unit normal. I'll change the normal calculation to (p2-p1)*(p3-p1) in the next set of changes. (The facet class suffers from the same "backward" convention; will fix that, too. Probably the dyslexic switch happened because I visualized the factors with p2-p1 spatially to the right...! :)

Thanks for pointing this out.

Best,
Andy

Andrew D. Hwang                 address@hidden
Department of Math and CS       http://mathcs.holycross.edu/~ahwang
College of the Holy Cross       (508) 793-2458 (Office: 320 Swords)
Worcester, MA, 01610-2395       (508) 793-3530 (fax)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]