Page 1 of 1

Rotating 3d Anaglyph Lorenz attractor on QPC2 (and QL?)

Posted: Sun Mar 26, 2023 9:41 pm
by mrzap000
Hi folks,
played a bit more with fractals over the weekend. If any of you has got one of those red/blue 3d glasses, you can play with the Lorenz attractor. Source is here: https://bitbucket.org/mrzap000/lorenz/src/master/
Pretty basic, not smooth, didn't have time to find some smarter way to animate, but kind of oddly satisfying. 3d is super simplified, eyes converge more or less on the Y (vertical) cartesian axis, hence the rotating Lorenz attractor will alternatively pop in and out of the screen.
Tried to put some code to possibly make it run on a Standard QL (if VER$ not "HBA" then it *should* work - those with a QL or a working QL emulator could possibly test and suggest how to fix if it doesn't work).
Enjoy...
3d anaglyph screenshot of rotating Lorenz attractor
3d anaglyph screenshot of rotating Lorenz attractor

Re: Rotating 3d Anaglyph Lorenz attractor on QPC2 (and QL?)

Posted: Mon Mar 27, 2023 12:42 pm
by stevepoole
Hi Mrzap000,

Your program works fine on my SuperGoldcard QL under SMSQ/E.

But under QDOS, three lines need changing :
170 REMark PI=4*ATAN(1) , wil avoid the name-table clash !
370 & 530 change FOR i% to FOR ii , as QDOS does not accept integer for loops....
Then all is ok.

Regards, Steve.
_________________

Re: Rotating 3d Anaglyph Lorenz attractor on QPC2 (and QL?)

Posted: Mon Mar 27, 2023 5:07 pm
by mrzap000
stevepoole wrote: Mon Mar 27, 2023 12:42 pm 170 REMark PI=4*ATAN(1) , wil avoid the name-table clash !
370 & 530 change FOR i% to FOR ii , as QDOS does not accept integer for loops....
Thanks Steve, I couldn't remember if PI needed definition on a QL or not.. and thanks for the note on integer loops.
Fill fix that and update the repo.