Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Binary expression tree generator.
Java
Branch: master

README

Code for working with Binary Expression Trees.

Here's an example of a possible application that I made in Processing, where I use 3 randomly generated expressions to dictate the hue, saturation, and brightness values of individual pixels (using x-pos, y-pos, and time as variables):
http://shoffing.com/pages/projects/expressiongen/


And here's my algorithm for generating a random expression, in nifty diagram form:
http://shoffing.com/pages/projects/expressiongen/algorithm.png


Some example expressions that were generated and then simplified (simplification is very much a WIP):

sin((-3.380515006246586 / (x * -6.972902091033304))) - x
(2 * (tan(x) - (((x ^ 6.5) ^ -7.39) ^ -7.1))) + x
(1 - x) * -1.97
(5 + ((x * -1.01) * -8.18)) - (cos((x + -0.6)) / x)
cos(((5 + cos(((x * 1.65) / x))) ^ (-1.31 ^ 4.12)))
Something went wrong with that request. Please try again.