I came across this demo I had forgotten in some nondescript collection of graphics applications folders I had laying around. Some people in the Boston Computer Society took it upon themselves to recreate (in 1986) the 'boing!' demo from the Amiga which features a fake 3d bouncing ball animation, complete with sound, running in Workbench.
This fine piece of hackery involves color palette cycling to give the illusion that the ball is spinning on itself, so several areas of the balls are using the same colors spread out to distinct palette indices. By cyling the palette definitions around, the pixels are merely switching colors during a vertical blanking retrace instead of being calculated from a complicated linear algebra 3d transformation and some kind of raytracing 3d engine (wouldn't be possible on the original early 80's Amiga).
From a Macintosh standpoint, this is where it gets interesting. This was done fairly early in the black and white compact macintosh cycle (1986) so I'm not 100% certain the 'color' quickdraw palette was available. I half remember it was possible to set colored pixels in some apps that you'd still see in black and white on screen, but could be transformed into their proper color if you printed them with the appropriate colored ribbon printer. It's possible that the code used an entirely new data structure outside of quickdraw to deal with palette cycling, but I'm not solid enough on these matters where I could do my own code.
Still, with no special handholding done for you graphics wise (I'm thinking the lack of hardware sprite), it's quite remarkable that so many pixels are pushed so fluidly on this demo.
I made a small video about it if you want to see it in action, from a direct RGBtoHDMI video capture from my Mac Plus. I also included a bit on the Amiga version (emulated in WinUAE)
This fine piece of hackery involves color palette cycling to give the illusion that the ball is spinning on itself, so several areas of the balls are using the same colors spread out to distinct palette indices. By cyling the palette definitions around, the pixels are merely switching colors during a vertical blanking retrace instead of being calculated from a complicated linear algebra 3d transformation and some kind of raytracing 3d engine (wouldn't be possible on the original early 80's Amiga).
From a Macintosh standpoint, this is where it gets interesting. This was done fairly early in the black and white compact macintosh cycle (1986) so I'm not 100% certain the 'color' quickdraw palette was available. I half remember it was possible to set colored pixels in some apps that you'd still see in black and white on screen, but could be transformed into their proper color if you printed them with the appropriate colored ribbon printer. It's possible that the code used an entirely new data structure outside of quickdraw to deal with palette cycling, but I'm not solid enough on these matters where I could do my own code.
Still, with no special handholding done for you graphics wise (I'm thinking the lack of hardware sprite), it's quite remarkable that so many pixels are pushed so fluidly on this demo.
I made a small video about it if you want to see it in action, from a direct RGBtoHDMI video capture from my Mac Plus. I also included a bit on the Amiga version (emulated in WinUAE)