Omnimaga

General Discussion => Art => Topic started by: treyk4 on December 08, 2011, 05:19:00 pm

Title: Organic Pattern Generator for TI Calculators
Post by: treyk4 on December 08, 2011, 05:19:00 pm
Hey all,
first post here. Just thought I'd share a program I recently made. It's programmed in Axe and uses a few specific rules to generate random patterns. Often they come out pretty cool, like this:
(http://img43.imageshack.us/img43/3821/rlss5.png)

You can view a few more here: http://imageshack.us/g/593/rlss1.png/ (http://imageshack.us/g/593/rlss1.png/)


Here's the program (and the source, if you want to play with it): http://www.mediafire.com/?yavujc2kpahhewd
0 clears the screen
2 generates a new pattern to draw
3 (hold down) draws the current pattern

Also, the source is below if you don't want to download it. I haven't much cleaned it up, and I've moved the pattern generator and drawing routine into their own function as I intend to make them configurable in a future release.
Spoiler For Spoiler:
:.RANDLINE
:DispGraphClrDraw
:
:rand→R
:rand→P
:rand→Q
:1337→M
:
:Repeat getKey(15)
:GENR()
:DRWL()
:
:If getKey(26)
:rand→P
:rand→Q
:ElseIf getKey(33)
:ClrDrawDispGraph
:ElseIf getKey(18)
:rand→M
:DispGraph
:End
:End
:
:Lbl GENR
:(Rcos(R)sin(R))-(R xor M)→R
:Return
:
:Lbl DRWL
:Line(R^96,R^64,(R xor P)^96,(R xor Q)^64)
:Return


Let me know what you think!
Title: Re: Organic Pattern Generator for TI Calculators
Post by: parserp on December 08, 2011, 05:22:01 pm
That is awesome!!!!!!! :D