### Understanding the view

The complete format ( not all are used by RT ) is:

{ vrc

vrp ( 0 , 0 , 0 );

prp ( 0 , 0 , -10 );

vup ( 0 , 0 , 1 );

vpn ( 1 , 0 , 0 );

umax 3;

umin 0;

vmax 3;

vmin 0;

type 1;

f 1;

b 0;

fon 0;

bon 0;

}

All the scene is described in an absolute system.

With param vcr, vup, vpn, you describe a second system, the observer system. So, if you want to modify the view, you must modify only some parameter in vcr section. The tree axes are called u,v,n.

So if you want to modify the view, you must modify only some parameter in vcr system.

vrc

is the origin of the new coordinate system.

vpn

defines the n axis.

vup

defines the v axis.

Fixed this three parameter, the new system is defined. The image will be on plane uv. We can define which part of plane we want to represent the image, with:

Umin, Umax, Vmin, Vmax

the min and max value on the u,v axes, which represent the image that we want to see.

The others parameters are :

prp

describes the position of the observer. IMPORTANT: its coordinates are in the vcr system and not in the absolute system like other parameters. The rays will start from prp point and will go through the window and in the scene.

type

is the way of representation: o means parallel projection, 1 means perspective projection.

Example:

If you want to center an object at position (10,20,5) you must follow this procedure.

1) fix parameter prp, Umin, Umax, Vmin, Vmax. They will not change if you move the system.

2) put vcr in a point quiet near the object. Es. (0,10,0).

3) the n axis is the direction where you see. We can set vpn equal to (10,10,5) so it is in the direction exactly ( vcr + vpn = object position ). Don't worry if vpn is not a versor.

4) You can use vup to set the top of the image. You can set it to (0,0,1). Don't worry if vup is not a versor or it is not vertical to vpn, but it is important that vup and vpn are not parallel.

If you want an aspect ratio = 1 you must follow the rule :

dimx / dimy = ( Umax - Umin ) / ( Vmax - Vmin )

where dimx and dimy are attributes of param section, while Umax, Umin, Vmax, Vmin are attributes of vcr section.