← Back

ofxAlgebraic

github.com/MindBuffer/ofxAlgebraic · @MindBuffer
OF 0.9 Graphics

Semantic simplification of basic trigonometry with gradient and basic bezier-curve support.

6 1 Last commit 10y ago Created 12y ago

Forks

Forks pushed to more recently than MindBuffer/ofxAlgebraic itself, plus any admin-confirmed fork with commits of its own — worth checking if you're hitting issues with the original.

JoshuaBatty/ofxAlgebraic by @JoshuaBatty · ★ 0 · pushed 10y ago

README

ofxAlgebraic



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).

EXAMPLE



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.setup(0.3f); algebraic.setGradient(1.f, 4.f); algebraic.setAmplitude(0.8f); algebraic.setFrequency(3.f); algebraic.setBezierDepth(-0.5f); float answer = algebraic.getSine() * algebraic.getSaw();

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

Get this addon

HTTPS
SSH