Page 1 of 1

3D Solids (wire frame) demo

Posted: Fri Mar 31, 2023 7:46 pm
by yock1960
Here is a program, written in Prog8, that displays and rotates a number of Platonic Solids. It uses double buffering to achieve 'smooth' animation...anywhere from 12-20 fps, depending on the size and complexity of the object. Source and program are included in the attached .zip. Works with R41/R42.

plato.jpg
plato.jpg (76.11 KiB) Viewed 5938 times
plato.zip
(17.46 KiB) Downloaded 547 times

Re: 3D Solids (wire frame) demo

Posted: Fri Mar 31, 2023 8:06 pm
by desertfish
Nicely done! I like the joyful tone about consulting the oracles

Re: 3D Solids (wire frame) demo

Posted: Fri Apr 07, 2023 8:26 pm
by yock1960
Here is an update to the program, that includes hidden line removal. The method used is a bit of a hack, but it works in the context of this program.
plato2.zip
(23.51 KiB) Downloaded 536 times

Re: 3D Solids (wire frame) demo

Posted: Sat Apr 08, 2023 1:10 am
by Daedalus
Works great!

Of course I couldn't resist getting a Bucky Ball past the Oracle... heh. I'm sure Plato would be all "It's a Bucky Ball. I'll allow it out of respect to Mr. Fuller."

256 colors at 320 by 200? Wait... 200? What shenanigans did you pull to get that frame rate? Inquiring minds want to know!

Ok, First, the vertexes are pre-calculated. Ok. That cuts out the transforms. But there's still the double buffer! Where's the memory for THAT, hmm?

Ah. 20 pixels off the top and bottom by using DC_VSTART and DC_VSTOP. Ok. And that "double buffer" looks a little dodgy... It might not be a whole 320 by 200, eh? That save enough memory so VERA can still have a palette and stuff.

Still! Damn! I'ma stash this one away for study...

Re: 3D Solids (wire frame) demo

Posted: Sat Apr 08, 2023 4:04 pm
by Yazwho
Looks good! 3d is possible on the x16, its just poses some interesting problems!

I tried my hand at 3d as well, results are here. Only works in Box16 nowadays.

Re: 3D Solids (wire frame) demo

Posted: Sun Oct 15, 2023 2:48 am
by Xiphod
Works on hardware, but pressing "M" during the rendering to return to the menu isn't working (it looks like it TRIES to go back to the menu, but the video gets all corrupted and I have to reboot the system)

Not sure if a P8 issue?? Prog8 has probably had updates since this was last built.

Program works on R45, just you get one chance at the startup menu to choose