## project onto arbitrary viewing plane?

### project onto arbitrary viewing plane?

I have read some treatments (e.g. Foley & van Dam, 1982, section 8.2) of
perspective projection where they assume
- centre of projection (viewpoint) is (0,0,0)
- projection plane (view plane) is the plane z = b0

I would like to do projection onto an arbitrary plane:
z = b0 + b1*x + b2*y + b3*x*y
and the centre of projection is somewhere behind that plane on a line
normal to it.

The FAQ says:
=================================
The trick is to take an arbitrary viewpoint and plane, and
transform the world so we have the simple viewing
situation. There are two steps: move the viewpoint to the
origin, then move the viewplane to the z=1 plane. If the
viewpoint is at (vx,vy,vz), transform every point by the
translation (x,y,z) --> (x-vx,y-vy,z-vz). This includes
the viewpoint and the viewplane. Now we need to rotate
so that the z axis points straight at the viewplane, then
scale so it is 1 unit away.
=================================
But this is too brief for me to follow. Can anyone point me to a fuller
treatment? (The Foley and Van Damm treatment in section 8.3 is very hard
for me to follow because it contains a lot of stuff, e.g. clipping to view
volume, I would like to skip at this point)

Here are some specific questions.

Quote:> There are two steps: move the viewpoint to the
>       origin, then move the viewplane to the z=1 plane.

I am aiming to simulate some real scene. The scene may not be at z=1,
maybe z=100. So z=1 will produce unrealistic amount of perspective
distortion. So how to modify the procedure to use some other z-value?

Quote:> If the viewpoint is at (vx,vy,vz), transform every point by the
> translation (x,y,z) --> (x-vx,y-vy,z-vz). This includes
> the viewpoint and the viewplane.

OK so now the viewpoint is (vx-vx,vy-vy,vz-vz)=(0,0,0)
The new viewplane is
(z-vz) = b0 + b1*(x-vx) + b2*(y-vy) + b3*(x-vx)*(y-vy)
z = b0 + b1*(x-vx) + b2*(y-vy) + b3*(x-vx)*(y-vy) + vz
It that right?

Quote:> Now we need to rotate
>       so that the z axis points straight at the viewplane,

How to do this?

Quote:> then scale so it is 1 unit away.

How?

Then I plot the points (x/z, y/z)?

Thanks very much for any help.

Bill Simpson

### project onto arbitrary viewing plane?

PS If anyone has a pointer to projection onto a plane with some rotation
angles (the idea is the camera rotates to keep a certain 3D point centred
on the viewplane), that would be great, too. Thanks very much.

Bill Simpson

### project onto arbitrary viewing plane?

>Subject: project onto arbitrary viewing plane?

>Date: Fri, 18 June 1999 07:48 AM EDT

>I have read some treatments (e.g. Foley & van Dam, 1982, section 8.2) of
>perspective projection where they assume
>- centre of projection (viewpoint) is (0,0,0)
>- projection plane (view plane) is the plane z = b0

>I would like to do projection onto an arbitrary plane:
>z = b0 + b1*x + b2*y + b3*x*y

Is that a plane?

z=b0+b1*x+b2*y is, though it's still a funny way to express it.

Stuart Finlayson

In order to set my camera angle as large a possible, while taking into
account:
a) The 3D bounding box or the model
b) The position of the camera,
c) The aspect ratio of the viewing window

I need to know how to project the 3D bounding box to a plane whose normal is
a scalar of the vector from the camera position to the center of the 3D
bounding box.  All I need is the aspect ratio of the resulting 2D bounding
box.

--
Mark Goldberg
Monolith Custom Computing, Inc.