3 ms·
Regarding the OP doc and UV coordinates. A major area of investigation for us back in the day was finding interesting ways to displace the uv texture coordinat
by dtristram 2y ago
Regarding the OP doc and UV coordinates. A major area of investigation for us back in the day was finding interesting ways to displace the uv texture coordinates for each corner of the rectangular mesh. We used per-vertex colors, these days one would use a fragment (pixel) shader like those in ShaderToy.
A very interesting process displaces the texture coordinates by advecting them along a flow field. Use any 2D vector field and apply displacement to each coordinate iteratively. Even inaccurate explicit methods give good results.
After the coordinates have been distorted to a far distance, the image becomes unrecognizable. A simple hack is to have a "restore" force applied to the coordinates, and they spring back to their original position, like flattening a piece of mirroring foil.
Just now I am using feedback along with these displacement effects. Very small displacements applied iteratively result in motion that looks quite a bit like fluid flow.
- DonHopkins 2y agoAaaah, remember the simple directly manipulative pleasures of Kai Power Goo: LGR: Kai's Power Goo – Classic 90s Funware for PC! https://www.youtube.com/watch?v=xt06OSIQ0PE https://www.youtube.com/watch?v=xt06OSIQ0PE
- DonHopkins 2y agoThat was how Jeremy Huxtable (inventor of the original NeWS "Big Brother" Eyes that inspired XEyes) PostScript "melt" worked: choose a random rectangle, blit it with a random offset, lather, rinse, repeat, showing how by repeating a very digital square, sharp, angular effect, with a little randomness (dithering), you get a nice smooth organic effect -- this worked fine in black and white too of course -- it's just PostScript: https://www.donhopkins.com/home/archive/news-tape/fun/melt/melt.ps https://www.donhopkins.com/home/archive/news-tape/fun/melt/m... %! % % Date: Tue, 26 Jul 88 21:25:03 EDT % To: NeWS-makers@brillig.umd.edu % Subject: NeWS meltdown % From: eagle!icdoc!Ist!jh@ucbvax.Berkeley.EDU (Jeremy Huxtable) % % I thought it was time one of these appeared as well.... % NeWS screen meltdown % % Jeremy Huxtable % % Mon Jul 25 17:36:06 BST 1988 % The procedure "melt" implements the ever-popular screen meltdown feature. /melt { 3 dict begin /c framebuffer newcanvas def framebuffer setcanvas clippath c reshapecanvas clippath pathbbox /height exch def /width exch def pop pop c /Transparent true put c /Mapped true put c setcanvas 1 1 1000 { pop random 800 mul random 600 mul random width 3 index sub mul random height 2 index sub mul 4 2 roll rectpath 0 random -5 mul copyarea pause } for framebuffer setcanvas c /Mapped false put /c null def end } def melt Here's Jeremy's original "Big Brother" eye.ps, that was the quintessential demo of round NeWS Eyeball windows: https://www.donhopkins.com/home/archive/news-tape/fun/eye/eye.ps.old.txt https://www.donhopkins.com/home/archive/news-tape/fun/eye/ey...
- interroboink 2y agoAre these animated, or somesuch? I tried naïvely using `ps2pdf` (Ghostscript), but got errors on both of them. I guess they're meant to be consumed by some other sort of system?
- DonHopkins 2y agoOh sorry I didn't explain: they're interactive PostScript scripts for the NeWS window system, so they don't actually print, they animate on the screen! The "pause" yields the light weight PostScript thread and lets the rest of the window system tasks run, and NeWS had an object oriented programming system that was used to implement the user interface toolkit, window managements, interactive from ends, and even entire applications written in object oriented PostSCript. NeWS is long obsolete, but you can run it in a Sun emulator! https://en.wikipedia.org/wiki/NeWS https://en.wikipedia.org/wiki/NeWS For example, here's a heavily commented demo application called PizzaTool: https://donhopkins.medium.com/the-story-of-sun-microsystems-pizzatool-2a7992b4c797 https://donhopkins.medium.com/the-story-of-sun-microsystems-... Source code: https://www.donhopkins.com/home/archive/NeWS/pizzatool.txt https://www.donhopkins.com/home/archive/NeWS/pizzatool.txt It uses an iterated feedback pixel warping technique kind of like melt.ps, to spin the pizza rotationally, which melts the cheese and pizza toppings, instead of melting the screen by simply blitting random rectangles vertically like melt.ps -- note the randomization of the rotation to "dither" the rotation and smooth out the artifacts you'd get by always rotating it exactly the same amount: % Spin the pizza around a bit. % /Spin { % - => - gsave /size self send % w h 2 div exch 2 div exch % w/2 h/2 2 copy translate SpinAngle random add rotate neg exch neg exch translate % self imagecanvas grestore } def It animates rotating a bitmap around its center again and again as fast as you "spin" it with the mouse, plus a little jitter, so the jaggies of the rotation (not anti-aliased, 8 bit pixels, nearest neighbor sampling) give it a "cooked" effect! It measures the size of the pizza canvas, translates to the center, rotates around the middle, then translates back to the corner of the image, then blits it with rotation and clipping to the round pizza window.