Blue Project
Kyle,Nigel,Jamie
 All Classes Files Functions Variables Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Art Class Reference

This class is what generates our random art. More...

#include <Art.h>

Public Member Functions

Exprbuild (int depth, G3D::Random &randomGenerator)
 Called to create a random expression. More...
 
shared_ptr< Image > nextImage ()
 Get the next random art image. More...
 

Static Public Member Functions

static shared_ptr< Artcreate (float timeIncr, int genDepth, uint32 num)
 time increment is how fast we step through the different art frames of the randomly generated 2d art animation. More...
 

Protected Member Functions

 Art (float timeIncr, int genDepth, uint32 num)
 
shared_ptr< Image > doRandomGray (float step)
 
float toReal (int i, int N)
 Scales our inputs to be less than 1. More...
 

Protected Attributes

shared_ptr< Exprexpression1
 Our randomly generated expressions, one for each color: r, g, b. More...
 
shared_ptr< Exprexpression2
 
shared_ptr< Exprexpression3
 
float ourTime
 
float step
 
float timeIncrement
 

Detailed Description

This class is what generates our random art.

It takes in a time increment, the depth of the random expression to generate, and a seed number. From calling nextImage() one is able to get the next image step in the 2d random art animation.

Constructor & Destructor Documentation

Art::Art ( float  timeIncr,
int  genDepth,
uint32  num 
)
protected

Member Function Documentation

Expr * Art::build ( int  depth,
G3D::Random &  randomGenerator 
)

Called to create a random expression.

This is a recursive method call where depth determines how many more recursive expansions we will use.

shared_ptr< Art > Art::create ( float  timeIncr,
int  genDepth,
uint32  num 
)
static

time increment is how fast we step through the different art frames of the randomly generated 2d art animation.

genDepth is related to the generation of the random function. Check the Expr class for more details on how the random math function is created/represented and the Art::build() on how depth is used

shared_ptr< Image > Art::doRandomGray ( float  step)
protected
shared_ptr< Image > Art::nextImage ( )

Get the next random art image.

float Art::toReal ( int  i,
int  N 
)
protected

Scales our inputs to be less than 1.

The behavior of the trigonometric functions in our random math expression is less desirable as input > 1.

Member Data Documentation

shared_ptr<Expr> Art::expression1
protected

Our randomly generated expressions, one for each color: r, g, b.

shared_ptr<Expr> Art::expression2
protected
shared_ptr<Expr> Art::expression3
protected
float Art::ourTime
protected
float Art::step
protected
float Art::timeIncrement
protected

The documentation for this class was generated from the following files: