Home Products Download Order Contacts

comp.graphics.algorithms

Subject: Re: Basic perspective/normal q



[jongware] wrote:

> I know it's no good -- that's why I get substandard results. Can you
> substantiate your comment with the required math? All inputs are as
> mentioned: a number of x,y,z coordinates for a plane; its normal; a camera
> position. I guess that's all what it takes for input.

If anything, it's too much. All you really need is the 'd' parameter
for the plane's normal equation:

plane = { P | P.N = d }

Any of those "x,y,z coordinate" triplets should do. Call it P0,
the reference for that plane, and the normal equation can be
rewritten:

(P-P0).N = 0

The test you have to make is on the sign of the left hand side of this
equation, with the camera position for 'P'. If it's positive, that
means the point is on that side of the plane the normal points out,
i.e. the plane is visible. Otherwise you're looking at it's back
side.

> I assume I'm correct in stating that if the (transformed!) z
> coordinates are in front of the camera position the plane should be
> visible (apart from its normal vector).

No. Those (x,y,z) triplets are just examples of points in that plane.
A random point on the plane can be *anywhere* on the viewer's z axis,
independently of whether the plane is visible or not. That's because
a lot of planes will be only *partly* visible. Half of any typical
plane is behind the viewer. The only exception to this are planes
orthogonal to the view direction.

A good part of your confusion may come from terminology. Are you sure
it's visibility of *planes*, as opposed to polygons, is what you have
to determine?

--
Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.

Reply


View All Messages in comp.graphics.algorithms

path:
Basic perspective/normal q =>Re: Basic perspective/normal q =>Re: Basic perspective/normal q =>

Replies:
Re: Basic perspective/normal q
Re: Basic perspective/normal q

Copyright 2006 WatermarkFactory.com. All Rights Reserved.