DISPLAY MODES
Image memory
If yes graphic is active (defaulr) the image memory is that of
the graphic processor. Command displ writes in that memory and result appears
displayed on the screen.
If no graphic is active, the program can run on a system without graphic processor,
images are computed and saved on the disk.
Display modes
If yes displ is active (default) displays are effective.
If no displ is active displays are inhibited.
If no illum is active (dafuult) displays are in wired form.
If yes illum is active , zbuffer eliminates hidden parts and the color is calculated for each pixel as a function:
1) The lights (see also manuel.light.htm).
2) The model illumination at illuminated point of the treated surface.
3) The position of the eye.
The perspective
The stage is built in a coordinates system called absolute. A virtual camera is positioned in this system with the commands:
(eye): eye position.
(aim): aim point.
(axis): direction.
(foc): focal.
(roll): gradient of the camera on the axis oeil -> aim).
(type): "aim" ou "axis".
A perspective is provided on the plan whose normal is the (eye -> aim point) opening
foc camera is tilted by an angle 'roll', the image is clipped by current
window.
The near and far planes of the viewingpyramid are defined by:
(see cut).
The commande pers allows to choose the type of the projection:
pers(1) or yes pers (default): conic perspective.
pers(0) or non pers: cylindrical perspective.
pers(2): curve perspective.
A procedural perspective (writed in ANYFLO language) may be defined by a local function
on a view.
A procedural perspective (writed in C language) may be defined by changing the function
pers_utilisateur in file utilb.c, must be
status pers=num with num < 0.
Views are activated by: validate view(id).
Must be yes view to enable multiple views.
A particular view may be attached to a volume by:
view vol(id_vol)=id_view
validate pers vol(id): generates the volume distorted by perspective,
seen from another angle we get strange effects ...
An arbitrary perspective may be defined on a view id
by a 4*4 matrix from the eye system to the perspective system by:
´generate pers(p0,p1,...,p15) view(num)´
The command pers(n) view(id)=p0,p1,...,p15 allow to change
the matrixes n1 = 1, 2, 3 et 4 of view id.
n = 1: absolute system -> eye system
n = 2: eye system -> perspective system
n = 3: absolute system -> perspective system
n = 4: eye system -> absolute system
A procedural perspective may be defined by passing
some functions name (insted of matrixes) to the commands:
abs eye view(num) = "function name"
eye pers view(num) = "function name"
pers screen view(num) = "function name"
screen abs view(num) = "function name"
pers abs view(num) = "function name"
Such fynctions are likely:
toto()
{
p = poi /* p = point in the first system */
x = p[0]; y = p[1]; z = p[2]
xp = ... /* comput the point in the second system */
yp = ...
zp = ...
validate pers(xp,yp,zp) /* gives the result */
}
Access to the perspective
In texture mapping procedural mode a set of commands allow to modifiate and recover the
parameters of the current point displayed:
poi: returns absolute coordinates
normal poi: Retourne la normal en ce point
eye poi: returns the coordinates in the eye system.
pers poi: returns the coordinates in the perspective system.
screen poi: returns the coordinates in the screen system.
validate pers(x,y,z): validates the perspective.
ILLUMINATION MODELS
An illumination model can be assigned:
1) Generally on a volume.
2) Locally on a facet..
3) Locally on a vertex.
Parameters are: illum,ref,spe,bri,tran:
illum = smooth mode:
0: wired form
1: filled
2: GOURAUD
3: PHONG
if illum < 0: normals are not oriented
ref = reflexion coefficient = (reflected light) / (incident light)
spe = specular coefficient (intensity of reflection)
bri = brillance: spread reflection between 0 (diffuse) to 100 (sharp)
tran = transparency: beween 0 (opaque) and 1 (transparent)
Syntax:
illum vol(id)=illum,ref,spe,bri,tran
illum fac(f)vol(id)=illum,ref,spe,bri
illum vertex(s)vol(id)=illum,ref,spe,bri
A law of variation of specular depending on the angle of incidence can be given by:
law vol(id)=x1,y1,0,x2,y2,0,... representing the variations of the specular y according to
the angle x (between 0 and PI/2).
See demo1_illum.func.
DISPLAY PARTICLE
Particle volume
particle vol n=dens,coe,fact,alea,max1,max2
Si ´yes particle´ est actif, le volume n sera affiché en particules (au lieu
d´un lissage, les points de la surface sont rendus par un nuage de particules).
dens = densité entre 0(aucune particule) et 0(densité maximum)
coe = dispersion coefficient between 0 (particles on the surface)
and 1 (cloud radius the size of the faceta facette)
fact = density multiplier for a particles cloud.
alea = 1: Aléatoire reproductible
max1 = maximum number of generated particles
max2 = maximum number of particles of a cloud
Particle facet
particle fac(n1) vol(id) = d,c,...
Assignes a particle display to the facet n1 of volume id.
Note:
Each particle may be replaced by an object with
command motif vertex vol(id1)=id2.
SHADOWS
A volume can receive numbers of volumes droping shadow:
shadow vol n=n1,n2,...
With yes shadow volumes n1,n2,... will drop shadow
Note:
Data base is saved by lcommand:
write ascii radius "name"
must be passed to the raytracing nodule name radius