Some Simple Programs from
Graphics Programming in Icon

[thumbnail] Sierpinski's Triangle
Starting with a blank window, Sierpinski's triangle gradually is filled in, pixel by pixel. The process continues indefinitely, but since the window has a finite number of pixels, the image eventually stops changing.
Source code.
[thumbnail] A Spiral
Randomization can produce striking variations in appearance.
Source code.
[thumbnail] [thumbnail] Fractal Stars
It may seem surprising that these two figures were drawn by the same procedure with only different parameters.
Source code.
[thumbnail] Random Paint Splatters
This display was produced by a fifteen-line program, not counting comments.
Source code.
[thumbnail] Random Rectangles
Recursive division and random coloration produced this decorative image.
Source code.
[thumbnail] Animated Sunset
Running the program produces a sun in motion, here shown by gray circles.
Source code.
Animated image.
[thumbnail] Bouncing Balls
Although the static image is not very interesting, this simple animation exerts an odd fascination when it runs.
Source code.
Animated image.
[thumbnail] Mixed Fonts
Try modifying the code to vary the type size as well as the font and style.
Source code.
Data file.
[thumbnail] Drawing in a Window
A program like this provides an easy way to develop your skill at moving the mouse precisely. Try writing your signature.
Source code.


graphics book page

Icon home page