ROTATING IMAGES PMODE3
Posted: Sun Dec 18, 2016 10:32 pm
Hello,
I am sure that most of us do know the incredible "rotozoom" created by Simon Jonassen for different computers.
When I saw it, I contacted him and he kindly showed me how it worked, great master!
I wanted to rotate an actual Pmode3 image, so he pointed me to a web where one can find all of the needed maths to do that (it is in french language)
http://www.alrj.org/docs/2D/rotozoom/rotozoom.html
Immediately I began to program something with those equations just to prove the concept.
When it finally worked, it was really slower than a snail
I contacted Simon again and we began a chain of modifications / optimizations in order to make it run faster and faster, since Nov, 8th it has lasted a bit more than a month.
The very first version needed about 5 seconds to draw a single frame, say one step!
Now the time varies upon the machine
for 32k machines ... 19,5 seconds to perform a 360 degrees (full turn in 64 steps)
for 64k machines ... 16,5 seconds (in MAP1)
This means that now a single frame (step) is done in about 0,3 sec or 0,26 sec (64k). The program runs 16-19 times faster than the first version!
This is the result of a lot of really 'mad' changes and lots of optimizations, for instance creating tables to reduce the calculations. Right now only additions and subtractions!
I upload here two VDK and two DSK files for Dragon and CoCo users, so anybody can try it! The versions for 64k machines won't work on 32k machines (if not expanded), as they
switch to MAP1 and use the full 64k of RAM, no Interpreter, no DOS
In next post, I will add some notes about the program
I am sure that most of us do know the incredible "rotozoom" created by Simon Jonassen for different computers.
When I saw it, I contacted him and he kindly showed me how it worked, great master!
I wanted to rotate an actual Pmode3 image, so he pointed me to a web where one can find all of the needed maths to do that (it is in french language)
http://www.alrj.org/docs/2D/rotozoom/rotozoom.html
Immediately I began to program something with those equations just to prove the concept.
When it finally worked, it was really slower than a snail
I contacted Simon again and we began a chain of modifications / optimizations in order to make it run faster and faster, since Nov, 8th it has lasted a bit more than a month.
The very first version needed about 5 seconds to draw a single frame, say one step!
Now the time varies upon the machine
for 32k machines ... 19,5 seconds to perform a 360 degrees (full turn in 64 steps)
for 64k machines ... 16,5 seconds (in MAP1)
This means that now a single frame (step) is done in about 0,3 sec or 0,26 sec (64k). The program runs 16-19 times faster than the first version!
This is the result of a lot of really 'mad' changes and lots of optimizations, for instance creating tables to reduce the calculations. Right now only additions and subtractions!
I upload here two VDK and two DSK files for Dragon and CoCo users, so anybody can try it! The versions for 64k machines won't work on 32k machines (if not expanded), as they
switch to MAP1 and use the full 64k of RAM, no Interpreter, no DOS
In next post, I will add some notes about the program