Skip to content

Instantly share code, notes, and snippets.

Natalie Freed nataliefreed

Block or report user

Report or block nataliefreed

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View buttons_and_sliders_export.pde
/*
Export buttons and sliders template/example.
Requires the ControlP5 library http://www.sojamo.de/libraries/controlP5/
*/
import processing.pdf.*;
import java.util.Date;
import controlP5.*;
ControlP5 cp5;
View vector_bitmap_star.pde
//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
@nataliefreed
nataliefreed / turtle.js
Created Jan 24, 2019
P5.js version of turtle graphics program
View turtle.js
// 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;
View drag and drop example 2.js
var circles;
var currentDragged;
var clickRadius = 50;
function setup() {
createCanvas(500, 500);
imageMode(CENTER);
circles = [];
View drag and drop example.js
var circles;
var currentDragged;
var clickRadius = 50;
function setup() {
createCanvas(500, 500);
imageMode(CENTER);
circles = [];
View generative_sentences_with_arrays.js
/*
Exercises:
1. Change the nouns, verbs, adverbs to your own choice of words
2. Change the sentence structure (for example, add "and" and then a second clause)
3. Change the words to a different language (could be the one you are studying in
school right now). Change the sentence structure so that the sentences are grammatically
correct.
*/
var nouns, verbs, adverbs;
@nataliefreed
nataliefreed / gradient.js
Created Feb 10, 2017
Color gradient example using lerpColor
View gradient.js
var color1, color2;
var gradientHeight = 300; //change this to change how far down the screen the gradient goes
function setup() {
createCanvas(800, 800);
color1 = color('#e67e22');
color2 = color('#2ecc71');
View showMouseCoordinates.js
function setup() {
}
function draw() {
drawMouseCoordinates();
}
function drawMouseCoordinates() {
push();
View colorDifferenceTester.js
var color1, color2;
var colorToSelect = 0;
function setup() {
createCanvas(800, 800);
color1 = color(0, 0, 0);
color2 = color(0, 0, 0);
//draw some random colors in a grid
push();
View paint_combs.jscad
// title : Paste Paper Comb Generator
// author : Natalie Freed
// license : MIT License
function getParameterDefinitions() {
return [{ name: 'w', type: 'float', initial: 10, caption: "Width :" },
{ name: 'h', type: 'float', initial: 10, caption: "Height :" },
{ name: 'rows', type: 'int', initial: 5, caption: "Rows :" },
{ name: 'cols', type: 'int', initial: 5, caption: "Cols :" },
{ name: 'thickness', type: 'float', initial: 3, caption: "Extrusion Thickness (3D mode):"},
You can’t perform that action at this time.