Talent 3D Designer

Anything QL Software or Programming Related.
User avatar
BSJR
Trump Card
Posts: 213
Joined: Sun Oct 18, 2015 12:53 pm
Location: Amsterdam
Contact:

Re: Talent 3D Designer

Post by BSJR »

NormanDunbar wrote: Mon Sep 16, 2024 8:47 pm Impressive!

I'm wondering how fast in relation to actual speed, is that GIF?
The Avion.gif is only 130KB but still holds 89 frames. The green seems not to be defined.
The delay is set to zero so it's up to the machine & software how fast it runs.

On my old i5 machine with old Thumbs Viewer it runs a bit slower then on the Forum site, and in red.
But within QPC2 and my SQRview it's a bit faster and needs a delay of 4 or 5 to match the site speed.
With Dilwyn's AnimGIF it ran so fast I could not stop the animation and had great trouble getting back to SBasic to be able to RJOB it.

These 89 frames would make a 15MB big file of animated SPRs in mode 32.
Reduced to mode 4 it would still be almost 2MB.
With RLE compression that can be brought down to 350KB.
Unpacking and Native mode conversion will add to the frame delay.

BSJR


stevepoole
Aurora
Posts: 874
Joined: Mon Nov 24, 2014 2:03 pm

Re: Talent 3D Designer

Post by stevepoole »

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 !

OK for the avion data list, but the connections list seems to produce a cock-eyed plane using trigonometry !
The eye-point is '6000,6000,3000' ?.... but what is the SCALE factor on your screen ?
And what is the rotation speed around the vertical axis please ?

Getting closer to a complete superbasic listing, once these questions are sorted out...

Steve.


Derek_Stewart
Font of All Knowledge
Posts: 4608
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Talent 3D Designer

Post by Derek_Stewart »

Here is a PDF copy of the PrespTransform doc:
PerspTransform.pdf
(187.06 KiB) Downloaded 165 times


Regards,

Derek
User avatar
Popopo
Gold Card
Posts: 360
Joined: Wed Apr 07, 2021 10:37 am

Re: Talent 3D Designer

Post by Popopo »

Derek_Stewart wrote: Wed Sep 18, 2024 1:30 pm Here is a PDF copy of the PrespTransform doc: PerspTransform.pdf
Thank you Derek


User avatar
polka
Trump Card
Posts: 207
Joined: Mon Mar 07, 2011 11:43 am

Re: Talent 3D Designer

Post by polka »

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


May the FORTH be with you !
POLKa
User avatar
polka
Trump Card
Posts: 207
Joined: Mon Mar 07, 2011 11:43 am

Re: Talent 3D Designer

Post by polka »

Derek_Stewart wrote: Wed Sep 18, 2024 11:40 am Hi

I like the Forth language but have limited time to be proficient in it.

I used like using Brouhabouha Forth, would your 3D Forth file work in Brouhabouha?
I compared essentially ComputerOne FORTH and Digital Precision SupperFORTH, by porting on both some serious programs like a Conway's life and this 3D animation, and doing some other minor but significative tests.

Both these FORTH are implementations of 16bits F83 models, but I prefer ComputerOne because it is a very faithful classic "indirect threaded" implementation all in a 64Kb memory segment (thus usable even on a unexpanded 128K BBQL) ; it has a good compact interface with QDOS and device management, and a very usable 68xxx macro assembler (witch was actually used to metacompile the whole FORTH engine and machine code kernel itself).

The SupperFORTH has a separate engine and headerless kernel that was compiled with a classic 68xxx assembler, and the FORTH headers of the lower level words go fetch what they need there. This is IMO why this FORTH although bulkier is also slower (comparing for instance the 3D animations ports) and assembler user programming is discouraged.

I tested a little the Brouhabouha FORTH, but not much. Because it is a 32bits model implementation that separates apparently code, headers and data, it will not run on an unexpanded 128K BBQL. I should look at it more seriously, to see what it really has.

BYE

Too bad that ComputerOne FORTH can no longer be bought and is not PD loadable.


May the FORTH be with you !
POLKa
stevepoole
Aurora
Posts: 874
Joined: Mon Nov 24, 2014 2:03 pm

Re: Talent 3D Designer

Post by stevepoole »

Hi Polka & All,

I could not make head nor tail of the Forth, so I designed my own tumbling 3D plane, using Trigonometry. Here it is , just UNZIP & LRUN.
plane5.zip
(2.12 KiB) Downloaded 151 times

Capture d’écran (536).png
Capture d’écran (538).png


User avatar
Popopo
Gold Card
Posts: 360
Joined: Wed Apr 07, 2021 10:37 am

Re: Talent 3D Designer

Post by Popopo »

stevepoole wrote: Fri Sep 20, 2024 10:57 pm Capture d’écran (536).pngCapture d’écran (538).png
Wauuu!!! Amazing! it seems to me like big magic!


Derek_Stewart
Font of All Knowledge
Posts: 4608
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Talent 3D Designer

Post by Derek_Stewart »

HI Steve,

Really amazing, you are an excellent programmer.

Have to try the Forth version.


Regards,

Derek
stevepoole
Aurora
Posts: 874
Joined: Mon Nov 24, 2014 2:03 pm

Re: Talent 3D Designer

Post by stevepoole »

Hi Folks,

Just made the Plane program into a shootem-up version. Can you destroy two planes on one screenfull ? Blast away !

Just UNZIP, LRUN and use arrow keys to aim. Tested OK on QPC2. Will try to optimise for SGCs soon. Regards, Steve.
Planes7.zip
(2.92 KiB) Downloaded 184 times
Capture d’écran (542).png


Post Reply