home page icon Flash Bestiary / BASICs / Pseudo Mondrian
   

Pseudo Mondrian

As drastically different as this looks, this started out as a simple modification of the second program in this series (Random Pixels x 4). It was slightly tweaked to resemble the art of Piet Mondrian.

In this version, we use a very limited color palette (sampled from a couple of web-images of Mondrian paintings), and we grow and shrink each color block using a sine wave whose phase is determined by the position on the screen, the passage of time, and the sliders.

Quadrilateral symmetry is still used, to provide a pleasing visual arragement, although Mondrian himself wasn't quite so obvious with his block placement.

Here's the core code for growing and shrinking the blocks:

xphase = (this._x + getTimer()*.001)*.5
yphase = (this._y + getTimer()*.001)*.5
this._width = TILE_X+TILE_X*Math.sin(xphase);
this._height = TILE_X+TILE_X*Math.cos(yphase);

 

sourcecode iconDownload the flash project
book iconJim's Favorite Actionscript Books
wiki iconAsk Jim about Actionscript
Next: Spikies

Having trouble opening the project? You may need to Upgrade to Flash MX 2004



Copyright © 2003,2004 by Jim Bumgardner. All Rights Reserved.        Leave Jim some feedback