Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - treyk4

Pages: [1]
1
Art / Organic Pattern Generator for TI Calculators
« 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:

You can view a few more here: 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!

Pages: [1]