Skip to content
Semantic simplification of basic trigonometry with gradient and basic bezier-curve support.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


ofxAlgebraic is made to semantically simplify basic trigonometry and bezier functions over two dimensions.

Without any input, ofxAlgebraic will return 1.

ofxAlgebraic will take into account any information you give it.

It includes methods for retrieving values over:

  • Sine
  • Cosine
  • Sawtooth
  • Square
  • RandomWalk
  • Random
  • Triangle (not yet implemented)

Over any of the following:

  • Gradient
  • Bezier
  • Exponential (not yet implemented)

The signal is modulated by the following (REMEMBER, each of these can be modulated with the results of another "ofxAlgebraic" object):

  • Amplitude
  • Frequency

The "gradient" is added to the result (determined by entering the x & y co-ordinates).


Each of the types are as follows:

    ofxAlgebraic_<T>(T _value);
    ofxAlgebraic(float _value);
    ofxAlgebraicFloat(float _value);
    ofxAlgebraicDouble(double _value);
    ofxAlgebraicLongDouble(long double _value);

You can use it like this:

    float answer = ofxAlgebraic(0.5f).getSine();

Or include gradient, bezier, frequency and amplitude as well:

    ofxAlgebraic_<float> algebraic;
    algebraic.setGradient(1.f, 4.f);
    float answer = algebraic.getSine() * algebraic.getSaw();

This is an Adventure-Time-inspired ofx template by Mitchell Nordine.

You can’t perform that action at this time.