Many computer programs and screensavers to simulate Kaleidoscopes have been written, and are available for download. There are also some web based Kaleidoscopes, where you can view these images online.
If you want to make your own Kaleidoscope simulation, Dr. Cliff Pickover shows some simple pseudocode for a Kaleidoscope on his website:
DO FOR i = 1 to 40Today many folks spend their days staring at a "tube" with ever-changing mulitcolored pixels -- we call it a television. In the Victorian era, choices were a bit more limited. And maybe the revival of the fad in the 1970's says something about the quality of the TV shows, then.
x1 = random; y1 = random
x2 = random; y2 = random
x3 = random; y3 = random
/* Confine initial pattern to lower right quadrant */
if ( x1 > y1 ) then (save=x1; x1=y1; y1=save;)
if ( x2 > y2 ) then (save=x2; x2=y2; y2=save;)
if ( x3 > y3 ) then (save=x3; x3=y3; y3=save;)
DrawTriangleAt(x1,y1,x2,y2,x3,y3)
/* Create 7 reflected images /
DO FOR j = 1 to 7
Flip (x,y) Points as Described in Text
DrawTriangleAt (x1,y1,x2,y2,x3,y3)
END
END
(c) 2006, Jorge Monasterio
No comments:
Post a Comment