Skip to content

Instantly share code, notes, and snippets.

Golan Levin golanlevin

Block or report user

Report or block golanlevin

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
@golanlevin
golanlevin / sketch.js
Created Sep 30, 2018
PoseNet skeletons with ml5.js & p5.js, using a pre-loaded video
View sketch.js
// Copyright (c) 2018 ml5
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
/* ===
ml5 Example
PoseNet example using p5.js
=== */
View palmsynth.pde
// https://imgur.com/a/ZEE2f
final color wristCol = color(255, 0, 255);
final color palmCol = color(127);
final color thumbCol = color(0, 255, 0);
final color finger1Col = color(255, 0, 0);
final color finger2Col = color(0, 0, 255);
final color finger3Col = color(0, 255, 255);
final color finger4Col = color(255, 255, 0);
color fingerColors[] = {
@golanlevin
golanlevin / noiseloop.pde
Last active May 1, 2019
Processing code to demonstrate seamless loop of 1D noise
View noiseloop.pde
// Processing 3.0x code to demonstrate seamless loop of 1D noise
// Inspired by, and created in support of:
// "Drawing from noise, and then making animated loopy GIFs from there" by Etienne Jacob (@n_disorder)
// https://necessarydisorder.wordpress.com/2017/11/15/drawing-from-noise-and-then-making-animated-loopy-gifs-from-there/
// Note: this program has no dependencies, and does not require SimplexNoise.
// Demo GIF: https://media.giphy.com/media/xUOxeU2ELSPeTbevle/giphy.gif or http://gph.is/2Ah5kqG
PGraphics offscreenImg;
float myScale = 0.01;
float radius = 100.0;
@golanlevin
golanlevin / modulo_example.js
Created Oct 24, 2017
Modulo Example from Golan's Coding Train
View modulo_example.js
var nElements = 7;
var myCounter = 0;
var ping = 0;
function setup() {
createCanvas(600, 500);
}
function draw() {
background((255*(1-(ping*=0.95))), 255,255);
@golanlevin
golanlevin / basicspring.pde
Created Oct 19, 2017
A Spring in Processing
View basicspring.pde
// A basic spring in Processing, based on:
// Hooke's law: F = -kx
// Newton's law: F = ma
// For more examples, see this lecture:
// http://cmuems.com/2015c/deliverables/deliverables-10/springs/
float restLength;
float vx;
float px;
@golanlevin
golanlevin / claker-loop.js
Last active Sep 26, 2016
Repaired version of Claker's animated gif loop project for 60-212
View claker-loop.js
var xp = 0;
var step = 1;
var nFramesInLoop = 180;
var nElapsedFrames;
var bRecording;
var bIAmRunningThisOnMyLaptop = false;
//===================================================
function setup() {
@golanlevin
golanlevin / histogramMatching.pde
Created Feb 27, 2016
Processing program for histogram matching (work in progress)
View histogramMatching.pde
float ideal[] = {
0.092,
0.518,
0.846,
1.000,
0.960,
0.850,
0.740,
0.640,
0.550,
@golanlevin
golanlevin / xy_cleaner.pde
Last active Feb 25, 2016
Slideroom XY Cleaner in Processing
View xy_cleaner.pde
// Removes extra line breaks in .TAB files generated
// by SlideRoom .TSV Spreadsheet export.
// Golan Levin, February 2016.
String inputFilename = "GL_for_XYChart.tab";
void setup() {
String rawlines[] = loadStrings(inputFilename);
ArrayList<String> newlines = new ArrayList<String>();
@golanlevin
golanlevin / template_README.md
Last active Feb 18, 2016
Template for openFrameworks Example README.md files.
View template_README.md

#About exampleName

###Learning Objectives

This openFrameworks Example is designed to demonstrate ...

  • How to ...
  • The ability of openFrameworks to ...
@golanlevin
golanlevin / pointImager.pde
Created Feb 13, 2016
Processing 3.0 utility to load a folder of data files, containing colored 3D points; outputs a folder of images of the colored points.
View pointImager.pde
// Processing 3.0 program to load a folder of data files, containing colored 3D points.
// The program outputs a folder of images (in "output/" folder) of the colored points.
// Golan Levin (@golan), February 2016, written for Claire Hentschker
//
// The lines of the data files are in the format:
// X Y Z R G B A B C
// The data values are space-separated; see example file below.
/* Sample data file: data/arcade_003251.txt:
-33.92082214 -19.60678101 33.81335068 106 142 217 -0.517697 -0.204671 -0.830723
You can’t perform that action at this time.