This repo contains all relevant files for the "Random Art" assignment for CS20/CS124 (Data Structures and Algorithms). The core task for students is using recursion and a generative grammar to produce random but valid mathematical expressions. These expressions are functions of (x, y), and must then be used to render a two-dimensional image.
The assignment specification, which is for the Java version only, is in the assignment directory.
Starter code exists in two languages/frameworks, in their respective directories: Java (using Swing and BufferedImage for graphical output) and C++ (using CImg for graphical output). In both cases, in addition to a miniature library for rendering images, there is an Expression class that implements an abstract syntax tree and and parsing for arithmetic expressions.
(If you want access to the full implementation/solution, please contact me. I am happy to share it with anyone who can give reasonable assurance they are an instructor or otherwise not helping someone cheat on an assignment.)