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.
3D Solids (wire frame) demo
- desertfish
- Posts: 1123
- Joined: Tue Aug 25, 2020 8:27 pm
- Location: Netherlands
Re: 3D Solids (wire frame) demo
Nicely done! I like the joyful tone about consulting the oracles
Re: 3D Solids (wire frame) demo
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.
Re: 3D Solids (wire frame) demo
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...
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
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.
I tried my hand at 3d as well, results are here. Only works in Box16 nowadays.
Re: 3D Solids (wire frame) demo
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
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