Commands

Principle

The objects

The transformations

















































Principle

The language

Command names

Multiplicity of a command

Evaluations

Assignment

First command

Le language

        The internal langage of ANYFLO is a simplified extension of the C language, in addition to the features of this language, it has hundreds of commands that return an expression syntactically correct and interpreted.

Command names

The name commands size is small enough to facilitate the function writing:

Two letters:
CG: center of gravity.
GO: debug command.
if: condition.
NF: number of facets.
NL: new line.
no: no.
NP: number of points.
PI: pi (3.1415926535...)

Three letters:
aba: abandonment.
abs: absolute value.
acc: acceleration.
aim: aim point.
add: add.
anc: anchorage.
ang: angle.
arc: arc.
ang: angle.
box: box.
coe: coefficient.
col: color.
cos: cosine.
cut: cut.
dec: deceleration.
tran: translation.
dim: dimension.
dist: distance.
dup: duplicate.
end: end.
ent: integer.
exp: exponential.
ext: extension.
eye: eye.
fac: facet.
foc: focal.
fog: fog.
for: loop.
hom: homothety.
hsv: hue saturation value.
ini: initialization.
int: integer part.
inv: inverse.
law: law.
log: logarithm.
lut: look up table.
pan: panoramic.
poi: point.
put: put.
rem: remove.
rev: surface of revolution.
see: see.
sin: sine.
spe: special.
sum: sum.
tan: tangent.
var: variable.
vol: volume.
win: window.
yes: yes.

For letters:
acos: arccosine.
alea: random reproductible.
alex: x random reproductible.
aley: y random reproductible.
alez: z random reproductible.
asin: arcsine.
atan: arctangent.
auto: automatic variable.
axis: axis.
back: backgrond.
ball: ball.
case: a label switch.
char: character.
clip: clip.
cosh: hyperbolic cosine.
cube: cube.
cutx: x cut.
cuty: y cut.
cutz: z cut.
demo: demo.
dila: dilatation.
dilx: x dilatation.
dily: y dilatation.
dilz: z dilatation.
disk: disk.
dist: distance.
draw: draw.
edit: edit.
else: sinon.
exec: execution.
exit: quit.
font: character fonte.
frac: fractal.
geod: geodesic surface.
goto: unconditional branch.
grep: search.
grid: grid.
help: help.
hole: hole.
lead: leader.
left: left.
line: line.
link: linker.
list: linked list.
LIST: debug command.
mass: mass.
menu: menu
meta: metacommande.
move: position.
name: name.
near: neighbor.
pend: pendulaire.
pers: perspective.
pipe: pipe.
play: play
pull: pull.
puls: pulsation.
quat: quaternion.
rand: no reproductible random.
read: read.
ring: ring.
roll: roll.
rota: rotation.
rotx: x rotation.
roty: y rotation.
rotz: z rotation.
secx: x section.
secy: y section.
secz: z section.
sinh: hyperbolic sine.
sort: sort.
sqrt: square root.
STOP: debug command.
tanh: hyperbolic tangent.
syma: symmetry.
symx: x symmetry.
symy: y symmetry.
symz: z symmetry..
text: text.
time: time.
traj: trajectory.
type: type.
unit: unit.
wait: wait.
zbuf: zbuffer.
zoom: zoom.

Five letters:
above: above.
acos: hyperbolic arc cosine.
alias: alias.
asinh: hyperbolic arc sine.
atanh: hyperbolic arc tangent.
atof: string -> float.
atoi: string -> integer.
audio: audio.
break: out of a bloc.
brush: brush.
clean: clean.
close: close.
coord: coordinate.
debug: debug.
depth: depth.
displ: display.
error: error.
field: field.
float: float.
fopen: opening a file.
force: force.
frame: frame.
fread: read a file.
front: front.
illum: illumination.
image: image.
inclu: contained in.
input: input.
limit: limit.
light: light.
motif: motif.
mouse: mouse.
pixel: pixel.
print: print.
prism: prism.
rand2: random integer no reproducible in an interval.
randf: random float no reproducible.
right: right.
reanc: reanchorage.
scale: scale.
scene: scene.
speed: speed.
split: split.
stock: store.
validate: validate.
video: video.
while: loop.
write: write.

More than five letters:
adhere: adhere.
adjust: adjust.
alphabet: alphabet.
ambiance: ambiance.
animate: animate.
attach: attach.
average: avarage.
behind: behind.
;bellow: bellow.
bitmap: bitmap.
calloc: memory reservation.
camera: camera.
center: center.
collision: collision.
compile: compile.
concat: concatenate.
contour: contour.
default: label of a switch.
device: device.
directory: directory.
deformation: deformation.
dynamic: dynamic.
envelope: envelope.
extern: external.
fclose: close a file.
follow: follower.
format: format.
fwrite: write a file.
generate: generate.
genetic: genetic.
getline: read a line.
getword: raed a word.
globale: global.
graphic: graphic.
heritage: inheritence.
history: history.
inside: inside.
interaction: interaction.
interpol: interpolate.
intersection: intersection.
lattice: lattice.
local: local.
luminance: luminance.
malloc: memory reservation.
matrix: matrix.
memory: memory.
message: message.
morphing: morphing.
motionblur: motionblur.
neuron: neuron.
network: neural network.
normal: normal.
number: number.
particule: particle.
period: period.
precision: precision.
number: object.
palette: palette.
product: product.
radius: radius.
rand2f: random float no reproducible in an interval.
rectangle: rectangle.
return: return from a function.
scalar: scalar product.
screen: screen.
segment: segment.
shadow: shadow.
simple: simple.
smooth: smooth.
sphere: sphere.
spring: spring.
static: static.
status: yes/no command.
stereo: stereoscopy.
string: string.
stringf: float -> string.
switch: multiple branch.
system: system.
vertex: vertex.
vector: vector product.

Multiplicity of a command

Simple commands:
A simple command is a command name optionally followed by parameters.
Example:
        screen; Clears screen with current color back.
        screen(r,g,b); Clears screen with color (r,g,b).
Multiple commands:
A multiple command is a result of command names followed optionally parameters:
Example:
        alea(20,30,40) vol(1); Randomly change by 20 (in x), 30 (in y) and 40 (in z) the vertices of volume 1.

Evaluations

A command ´com1(p1) com2(p2) .... comn(pn)´ is evaluated, ie it returns a value and / or performs an action.
Examples: poi(3) vol(1); returns the coordinates of point 3 of Volume 1.
        $poi(3) vol(1); prints the coordinates of point 3 of Volume 1.

Assignment

A command ´com1 com .... object(id)=val´ assignes valeu val to the property ´com1 com2 ...´ of the objetc id.
Examples:
       
poi(3) vol(1)=100,50,0; assignes value (100,50,0) to point 3 of volume 1.
        col vertex(3) vol(1)=0,1,0; assignes green color to point 3 of volume 1.

First commande

The first command in a multiple command determines the type of treatment:
If it is an object it is built, examples:
        1) cube(1); builds the default cube 1.
        2) cube(1)col(0,1,0); build the same cube of green color.
If this transformation is it necessarily applies to an object, eg:
        1) tran(0,100,0)vol(1); displaces (0,100,0) the volume 1 (by changing its coordinates).
        2) tran(0,100,0)matrix vol(1); displaces (0,100,0) the matrix of the volume 1 (without changing its coordinates).
If this property is it necessarily applies to an object, eg, examples:
        1) col vol(1)=1,0,0; gives red color to thr volume number 1.
        2) illum vol(1); returns the coefficients illumination volume number 1.

Les objets

The language objects

The anyflo objects

Objects properties

Access to objects properties

The language objects

Strings, example "AB"
Arrays of strings, example: "MOT1 MOT2 MOT3"
floating-point numbers, example: 1.0
Arrays of numbers, example (1,2.5,-1.0,.3)
Hybrid arrays, example: [1,3],"AB",0
Variables, example x=[1,5], elles peuvent être automatic, extern, global ou static.
Mathematical functions, example cos, sin, log.
Special functions, example distance, scalar.
User_written functions.

The anyflo objects

They are characterized by a type.
They are known at their creation by their identificator.
Examples:
        cube(7)dim(200); Creates volume type cube of side 200, and No. 7.
        ball("BB")dim(100)secy(12); rreates the name BB ball with center (0,0,0), of rayon100 and 12 sections in y.

Object Properties

Objects can be equipped with any number of arbitrary properties. When created certain properties can be set automatically.
For example cube(7)dim(200); creates an object of type cube with:
        property 'poi' consists of 8 points.
        property 'fac' consists of six facets.
After creating an object properties can be added to it, eg:
        illum vol(7)=1; assignes red color to volume 7.
        poi(0) vol(7)=0,0,0; adds point (0,0,0) to volume 7.

Access to object properties

Evaluation:
        poi(3) vol(1); returns the coordinates of point 3 of volume 1.
        illum vertex(3) vol(1); returns the color of vertex 3 of volume 1.
Assignment:
        poi(3) vol(1)=100,50,0; assignes (100,50,0) to point 3 of volume 1.
        illum vertex(3) vol(1)=0,0,1; assign color blue to vertex 3 of volume 1.
Created:
        illum screen vol(1)=1,0,1; creates ´illum screen´ property of volume 1 and assignes (1,0,1) to it.
        func vol(1)="toto"; assignes toto() function toto() to volume 1.
        local(0) vol(1)=func "toto"; add local function toto() to volume 1.

The transformations

Objects transformations

The transformation commands

Commands list

Objects transformations

All multiple command starting with a transformation command and with a type of object, transforms this object.
Examples:
        tran(100,0,0)vol(1); displaces the volume 1 by (100,0,0).
        alea(20,30,50)vertex[1,100] vol(1); randomly change by 20 (in x), 30 (in y) and 50 (in z) vertices(1,2,...,100) of volume 1.

The transformation commands

see transformations manual.

Commands list

interpreter commands
anyflo commands