What I did with Rev last night
viktoras didziulis
viktoras at ekoinf.net
Thu Jul 5 08:15:04 EDT 2007
Hi!
here are few more examples of "recreational" programming with Rev :-).
One stack is an experiment to see whether the well known "game of chaos"
where seemingly random process creates a deterministic outcome
(sierpinski fractal) produces similar results for any configuration of
points or just for the triangle. It turned out that for shapes other
than triangle it produces random clouds of points, so the triangle is
"special". It is also an alternative "random" way to draw a line between
any two points in space. You can draw and see these fractals and clouds
there:
go stack URL "http://ekoinf.net/chaos_game2.rev"
Another stack was an attempt to reproduce a few graphic algorithms in
Revolution. For water ripples (like in java applet at
http://www.neilwallis.com/java/water.html ) Revolution engine
unfortunately was too slow. But for the fire effect it performed
reasonably fast for small images (100x100 pixels). So I created a
completely useless stack where one can load any picture which is then
automatically resized to 100x100 and used as a cooling map for fire
algorithm so that animated burning fire patterns emerge in a small
100x100 image area nearby.
go stack URL "http://ekoinf.net/fire3.rev"
When loaded it contains 2 snapshots of an image and fire with cooling
patterns from the image. To see the animated fire you would have to load
your own image by clicking Fire!!! button. To stop the show click shift
or mouseclick on any of the 2 images in the stack.
One more interesting algorithm to test on Rev would be Warp Map
(http://freespace.virgin.net/hugo.elias/graphics/x_warp.htm). I saw it
implemented in C++ and Rebol (where surprisingly worked reasonably fast
on large images). But recently found more catching topic where
Revolution will be very useful - conversion of TFT monitors to
"holographic screens". Well, actually not really holographic but rather
stereoscopic (no glasses required) where image is formed from parts of 2
images and 3D object pops-out of in front or beyond the screen. All what
is needed is a high resolution printer, transparency and a tool to
calculate and produce parallax barrier mask based on monitor resolution
and pixel size (and then printed onto a transparency) and calculate a
gap between the LCD monitor and the barier. The tool will also combine
images suitable for viewing within such a system and be able to make 1
pixel offset adjustments to make images match with parallax barrier
mask. Going to use hints as in
http://www.lucente.us/career/syn3d/ps5.html
and
http://www.osa-opn.org/include/pdf_include/3DWorld_Part4.pdf
All the best!
Viktoras
J. Landman Gay wrote:
> ---
> It is so satisfying to be able to write whatever I need. Anyone else
> done little personal stacks with Rev lately?
>
More information about the use-livecode
mailing list