This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Bezier curve code generator | |
//Natalie Freed Oct. 2014 | |
DraggableHandler points; | |
void setup() | |
{ | |
size(600, 600); | |
points = new DraggableHandler(this); | |
points.addToEnd(new DraggableCircle(30, height/2, 10, color(0, 100, 0, 150))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setup() { | |
createCanvas(600, 600); | |
var listOfColors = [color('#aabf12'), color('#33ab12'), color('#165512'), color('#fe3fa2'), color('#a345cd')]; | |
var stripeWidth = 20; | |
strokeWeight(stripeWidth); | |
for(var i=0;i<=width/stripeWidth;i++) { | |
stroke(listOfColors[int(random(0, listOfColors.length))]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Title: | |
Imagined, Designed, and Programmed by: | |
Date: | |
Description: | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Turtle Graphics in Processing | |
// Natalie Freed, February 2013 | |
// This program shows another way to think about moving | |
// through Processing's coordinate system. Instead of placing | |
// points on a grid, you can imagine yourself as being somewhere | |
// on the grid, facing a direction. You can move forward or turn. | |
// The drawn line follows behind you. | |
PVector loc; //current location | |
float orientation; //current orientation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This example saves out two images of a star, | |
//a PNG (bitmap/raster) and a SVG (vector) | |
//SVG export: http://processing.org/reference/libraries/svg/ | |
import processing.svg.*; | |
size(300, 300); | |
//begin creating the SVG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// About turtle graphics: This program uses another way to think | |
// about moving through Processing's coordinate system. Instead of placing | |
// points on a grid, you can imagine yourself as being somewhere | |
// on the grid, facing a direction. You can move forward or turn. | |
// The drawn line follows behind you. | |
var loc; //current location | |
var orientation; //current orientation | |
var notch_height = 20; | |
var notch_width = 10; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
CurveBetween function by Natalie Freed, 9/22/16 | |
Draws symmetrical bezier curves between two points, | |
includes example of use | |
*/ | |
function setup() { | |
createCanvas(600, 600); | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Example of choosing a random function | |
Notice this program re-randomizes the row of shapes every time it's run! | |
*/ | |
function setup() { | |
createCanvas(800, 400); | |
background(50); | |
//draw some shapes to test. These aren't randomized |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Modified from P5 example at: https://p5js.org/examples/dom-video-capture.html | |
var capture; | |
function setup() { | |
createCanvas(320, 240); | |
capture = createCapture(VIDEO); | |
capture.size(320, 240); | |
capture.hide(); |
NewerOlder