This is a more realistic projection as approximately used by cameras. Again we project to some plane, but this time with rays starting from some `location' (on the side of the plane opposite to the objects). The simplest situation is, when the location is at the origin, and the plane we project to is given by . The projection is then given by
The projection onto the plane is given by:
If we translate 0 and the plane to the projection becomes
Let the projection plane be given in normal form by , where is a unit normal vector to the plane and is the signed distance to 0, i.e. is positive if points from 0 to the plane and negative otherwise. The corresponding perspective projection is given by , where , i.e. , thus
Since we have not infinite large images but some finite rectangle we have to clip the image, and hence we may clip the objects to some prism or pyramid.
The syntax in Pov-Ray for the general camera definition is as follows:
CAMERA: camera{ [CAMERA_ITEMS...] } CAMERA_ITEM: CAMERA_TYPE | CAMERA_VECTOR | CAMERA_MODIFIER | CAMERA_IDENTIFIER CAMERA_TYPE: perspective | orthographic | fisheye | ultra_wide_angle | omnimax | panoramic | cylinder CylinderType | spherical CAMERA_VECTOR: location <Location> | right <Right> | up <Up> | direction <Direction> | sky <Sky> CAMERA_MODIFIER: angle HORIZONTAL [VERTICAL] | look_at <Look_At> | blur_samples Num_of_Samples | aperture Size | focal_point <Point> | confidence Blur_Confidence | variance Blur_Variance | NORMAL | TRANSFORMATION Camera default values: DEFAULT CAMERA: camera { perspective location <0,0,0> direction <0,0,1> right 1.33*x up y sky <0,1,0> } CAMERA TYPE: perspective angle : ~67.380 ( direction_length=0.5* right_length/tan(angle/2) ) confidence : 0.9 (90% direction : <0,0,1> focal_point: <0,0,0> location : <0,0,0> look_at : z right : 1.33*x sky : <0,1,0> up : y variance : 1/128From [pov:180.html#target_713]
Note also the following:
6.4.1 Placing the Camera 6.4.1.1 Location and Look_At 6.4.1.2 The Sky Vector 6.4.1.3 Angles 6.4.1.4 The Direction Vector 6.4.1.5 Up and Right Vectors 6.4.1.5.1 Aspect Ratio 6.4.1.5.2 Handedness 6.4.1.6 Transforming the Camera 6.4.2 Types of Projection 6.4.3 Focal Blur 6.4.4 Camera Ray Perturbation 6.4.5 Camera Identifiers
Andreas Kriegl 2003-07-23