3D Solids (wire frame) demo

For Scene Demos that display animations, graphics, and music. Also for tech demos of graphics capability of VERA or the audio capabilities of the PSG, FM, or PCM audio channels.
Post Reply
yock1960
Posts: 136
Joined: Tue Nov 16, 2021 8:42 pm

3D Solids (wire frame) demo

Post 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 5900 times
plato.zip
(17.46 KiB) Downloaded 546 times
User avatar
desertfish
Posts: 1123
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Re: 3D Solids (wire frame) demo

Post by desertfish »

Nicely done! I like the joyful tone about consulting the oracles
yock1960
Posts: 136
Joined: Tue Nov 16, 2021 8:42 pm

Re: 3D Solids (wire frame) demo

Post 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 530 times
User avatar
Daedalus
Posts: 230
Joined: Fri Nov 11, 2022 3:03 am

Re: 3D Solids (wire frame) demo

Post 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...
User avatar
Yazwho
Posts: 172
Joined: Fri Feb 19, 2021 2:59 pm
Contact:

Re: 3D Solids (wire frame) demo

Post 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.
Xiphod
Posts: 568
Joined: Thu Apr 15, 2021 8:05 am

Re: 3D Solids (wire frame) demo

Post 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
Post Reply