Skip to content

Instantly share code, notes, and snippets.

View jacobjoaquin's full-sized avatar

Jacob Joaquin jacobjoaquin

View GitHub Profile
@jacobjoaquin
jacobjoaquin / pacIllusion.pde
Created October 29, 2014 04:38
Pac Illusion
float phasor = 0.0;
float phasorInc = 0.001;
float nFrames = 45;
void setup() {
// size(500, 500, "processing.core.PGraphicsRetina2D");
size(500, 500);
phasorInc = 1 / nFrames;
}
@jacobjoaquin
jacobjoaquin / radialRecursion.pde
Created October 5, 2014 15:17
Radial Recursion Experiment
void setup() {
size(500, 500);
noLoop();
}
void draw() {
background(255);
translate(width / 2, height / 2);
stroke(0, 96);
rc(new PVector(0, 0), 0, PI, 24, 14);
@jacobjoaquin
jacobjoaquin / circleInCircle.pde
Last active November 20, 2017 23:00
Simple circle in circle illusion.
int c = 255;
float angle = 0;
void setup() {
size(500, 500);
noStroke();
}
void draw() {
background(0);
@jacobjoaquin
jacobjoaquin / spiroIris.pde
Created September 21, 2014 07:24
Built with Processing.
ArrayList<Float> params;
void setup() {
size(1200, 1200);
params = new ArrayList<Float>();
params.add(200.0);
params.add(0.00001);
params.add(100.0);
params.add(50.0);
params.add(20.0);
@jacobjoaquin
jacobjoaquin / fiw_LED_mockup.pde
Created May 20, 2014 22:38
A quick mockup to see if LED strips aligned at an angle could produce readable scrolling type.
PGraphics theMask;
PImage imageMask;
String s = "Fresno Ideaworks LED Panel Test";
int xOffset;
int xInc = 200 / 11;
void generateMask() {
theMask = createGraphics(width, height);
theMask.beginDraw();
theMask.stroke(255);
@jacobjoaquin
jacobjoaquin / c64cam.pde
Created March 19, 2014 14:38
Processing sketch. Translates camera vision into a commodore.
/*
c64cam - Commodore 64 Vision with your Camera
Jacob Joaquin
jacobjoaquin@gmail.com
*/
import processing.video.*;
Capture cam;
int cam_width = 160;
@jacobjoaquin
jacobjoaquin / photoCycle.pde
Created March 18, 2014 01:03
Photo to experimental animation.
PImage img;
int[] b;
int p = 0;
void setup() {
size(500, 333);
img = loadImage("me2.jpg");
int l = width * height;
b = new int[l];
@jacobjoaquin
jacobjoaquin / pgstackExample.pde
Created February 28, 2014 15:58
PGraphicsStack Proof of concept. Use a stack for PGraphics like pushMatrix() and pushStyle() in Processing.
PGraphicsStack pgs = new PGraphicsStack();
class PGraphicsStack {
private ArrayList<PGraphics> pgList;
private ArrayList<PVector> dimensionsList;
PGraphicsStack() {
pgList = new ArrayList<PGraphics>();
dimensionsList = new ArrayList<PVector>();
}
@jacobjoaquin
jacobjoaquin / sokoban-xsb2rle.py
Last active December 27, 2015 15:09
Python script for converting a Sokoban XSB formatted ascii to a Sokovan RLE ascii. Usage example: $ cat my-level.xsb | ./sokoban_xsb2rle.py
#!/usr/bin/env python
import re
import sys
level = sys.stdin.read()
flat = []
output = []
for L in [L.rstrip().replace(' ', '-') for L in level.splitlines()]:
@jacobjoaquin
jacobjoaquin / EyesBacklighting.ino
Created October 30, 2013 16:41
For "Eyes that Follow" Instructable. Lights up 10 NeoPixels the color red with an Adafruit Gemma.
#include <Adafruit_NeoPixel.h>
#define NUM_LEDS 10
#define PIN 0
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
strip.begin();
setAll(strip.Color(255, 0, 0));