Skip to content

Instantly share code, notes, and snippets.

#define CLOCK_OUTPUT 13
#define POT_INPUT A0
#define ADD_BUTTON_1 2
#define ADD_BUTTON_2 3
#define BIT_0 5
#define BIT_1 6
var Board = function() {
var _board, _xSize, _ySize;
var _ensureExists = function() {
if(!_board) {
throw "ERROR: Board not initialized";
}
};
#include "ofApp.h"
/*
Declare these variables in your header file
int rowCount;
int colCount;
float rowHeight;
float colWidth;
*/
//--------------------------------------------------------------
#include "ofApp.h"
/*
Following should be declared in the header file
float angle;
float angleVel;
float amplitude;
float startAngle;
float noiseMod;
float noiseModDir;
#include "ofApp.h"
/*
Following variables should be decalared in the header file:
ofVec2f * points;
int count;
float m1;
float m2;
/*
Requires p5.js and dat.gui
View the interactive sketch here http://experiments.playdo.io/noise-draw/
*/
var points = [], c1, c2, c3, c4;
var Controls = function() {
this.invertCoordinates = false;
/*
Requires p5.js
View the gif here http://blog.playdo.io/post/144801898845/may-submission-for-mccc-growth
*/
var fromPoints = [], toPoints = [], lerpAmount = 0.018, speed = 0.018, fc = 1, fromHue = 0, toHue = 190, spokeCount = 2,
cp = [];
var Controls = function() {
this.n = 2;
this.d = 29;
/*
Requires p5.js
View the gif here http://blog.playdo.io/post/144801898845/submission-for-mcreativecoding-growth
*/
var shapes = [], cent, radius = 250, fromShape, toShape, indexOfTo = 1, count, pause = 10, duration = 60, shapeStartFrame;
var setup = function() {
createCanvas(540,540);
background(color("#2D4059"));