stevepoole wrote: Wed Sep 18, 2024 1:27 pm
Hi Polka,
You said: << the AVION connection data was compacted by the word XA that will just after the first connection -1 X automatically loop from point 2 to point 15 and then continues with 9 X 16 X etc. >> I am afraid I don't read FORTH code, so this explanation is rather abstruce !
Steve.
About the data format :
scale factor : 1000
MESH SQUARE
point 1 : 500 500 0 C
point 2 : -500 500 0 C
point 3 : -500 -500 0 C
point 4 : 500 -500 0 C
connection 1 : -1 X (go to point 1 pen up)
connection 2 : 2 X (plot line from point 1 to point 2)
connection 3 : 3 X (plot line from point 2 to point 3)
connection 4 : 4 X (plot line from point 3 to point 4)
connection 5 : 1 X (plot line from point 4 to point 1)
END-MESH (you plotted a square)
same way for CUBE :
1000
MESH CUBE
500 500 -500 C
-500 500 -500 C
-500 -500 -500 C
500 -500 -500 C
500 500 500 C
-500 500 500 C
-500 -500 500 C
500 -500 500 C
( define eight points )
-1 X 2 X 3 X 4 X 1 X
(plot the square base)
5 X 6 X 7 X 8 X 5 X
( go up and plot the upper square)
-2 X 6 X -3 X 7 X -4 X 8 X
(complete the cube with 3 vertical lines)
END-MESH
you should understand the way, FORTH does !
The AVION mesh is plotted following the same principle : first the 3D points and after, the way they are connected. Only to spare my typing, I defined a word XA which after -1 X will automatically loop
through 2 X 3 X 4 X... 14 X 15 X before continuing with 9 X 16 X etc.
The first parameter of a MESH , the "scale factor" is like the "image circle" radius of a photographic lens to display optimally the object (or scene) centered on the screen.
To answer your question about the rotation speed give me some time. The overall principle is to use a "rotationnal" vector and a second order approximation of a rotate step of the point of view vector OP using the vector multiply word V^ that was already defined for perspective transform. You can also do it your way, say rotate 5° to 10° between each view.
BYE POLKa