Default databases (supposedly set in 3D in the absolute coordinate system) are put into perspective by the classical method
of linear perspective
by conical projection of 3D points on the table, the top of the cone is the eye looking to the
aim point , with some focal and some roll.
Cylindrical perspective, curve perspectives,
procutedural perspective and adaptive adaptative perspective
are available in real time.
Returns the perspective type.
Activates perspective of type p:
p=0: cylindrical (isometric).
p=1: conic (default).
Returns the perspective projection of the 3D polygonal line
(x1,y1,z1), (x2,y2,z2), ...
pers 100,200,300; returns the perspective projection of the 3D point of absolue coordinates
pers(CG vol(1)); returns the perspective projection of center of gravity of volume 1.
pers(CG(poi[1,4] vol 1)); returns the perspective projection of center of gravity of points (1,2,3,4) of volume 1.
pers abs view(id)
Returns the matrix from perspective system to absloute system of view(id).
or no pers
Activates the cylindrical perspective (isometric).
With no pers, retutns the 9 parameters (xo,yo,zo, xc,yc,zc, xup,yup,zup)
defining the OpenGL gluLookAt transformation.
xo,yo,zo = eye position.
xc,yc,zc = position of thne referenced point.
xup,yup,zup = aim direction.
pers normal(xo,yo,zo, xc,yc,zc, xup,yup,zup)
Changes these parameters.
or no pers
Activates the conic perspective (default).
Activates the curve perspective: light rays are no longer straight lines but arcs through the eye, the aim point and the point to put into perspective.
Note: this perspective is computed in the block poi from the block poi validate,
this is why it is necessary to validate(1)poi vol(id)
whenever the geometry of the volume id is changed, and validate(-1)poi vol(id) to exit this perspective mode.
Activates the procedural perspective executed by function pers_utilisateur() of file
pers screen view(id)
Returns the matrix from perspective system to screen system of view(id).
Defining local functions on a view, if yes local and if yes view are cative, these functions are an encapsulated program in the view,
and it will be executed for each invocation of this view. . See an example in the VIEW function () of file