Skip to content

Instantly share code, notes, and snippets.

View LadyScream's full-sized avatar

LadyScream LadyScream

View GitHub Profile
@LadyScream
LadyScream / test.pde
Created February 14, 2019 10:58
test.pde
void setup() {
size(200, 200);
background(100);
stroke(255);
ellipse(50, 50, 25, 25);
println("hello web!");
}
imgur(){ $*|convert label:@- png:-|curl -F "image=@-" -F "key=1913b4ac473c692372d108209958fd15"
http://api.imgur.com/2/upload.xml|grep -Eo "<original>(.)*</original>"
| grep -Eo "http://i.imgur.com/[^<]*";}
@LadyScream
LadyScream / snowflakes.pde
Created December 26, 2018 08:04
Browniand Tree Snowflakes
Point current;
ArrayList<Point> snowflake;
boolean newSnow;
int newtimer;
boolean recording;
void setup() {
recording = false;
size(720, 720);
current = new Point(new PVector(height/2-100, 0));
@LadyScream
LadyScream / pendulum.pde
Created October 8, 2018 19:58
3D Pendulum tracing a path
boolean recording = false;
ArrayList<Pendulum> pendulums;
int frame;
float time;
void setup(){
size(720, 720, P3D);
pendulums = new ArrayList<Pendulum>();
pendulums.add(new Pendulum(0, 0, 0, 150, PI/64, PI/32));
pendulums.add(new Pendulum(pendulums.get(pendulums.size()-1), 75, PI/64, PI/128));
@LadyScream
LadyScream / lissajous.pde
Created October 3, 2018 20:01
Inspired by Daniel Shiffman on The Coding Train
boolean recording = false;
int frame = 1;
float theta = 0;
float phi = 0;
float time = 0;
float r = 50;
int cols = 5;
int rows = 5;
Lissajou[][] curves;
boolean recording = false;
int frame = 1;
float time = -PI/2;
float c = 10;
void setup(){
size(720, 720, P2D);
}
void draw(){
boolean recording = false;
float time = 0;
int frame = 1;
void setup(){
size(600, 600, P2D);
}
void draw(){
if (time<=TWO_PI || !recording){
@LadyScream
LadyScream / sun.pde
Created September 29, 2018 19:46
"Sun"
boolean recording = true;
int frame = 1;
float time = 0;
int lines = 50;
float circles = 10;
float speed = 0.01;
void setup(){
size(600, 600, P3D);
}
@LadyScream
LadyScream / inside.pde
Created September 29, 2018 04:00
I'm still learning Java and Processing so this is in no way the best way to achieve this, but this is the way I've done it!
float time = 0;
int frame = 1;
boolean record = false;
Cube cube;
void setup(){
size(600, 600, P3D);
cube = new Cube(new PVector(0,0,0), 150);
}
@LadyScream
LadyScream / geometric.pde
Created September 28, 2018 19:23
Procedural geometric shapes, inspired by: https://twitter.com/sasj_nl/status/1045340932424560641
ArrayList<Way> ways = new ArrayList<Way>();
int cols = 10;
int rows = 10;
int gaps = 30;
void setup() {
size(600, 600, P3D);
float cw = (width-gaps*2)/cols;
float ch = (height-gaps*2)/rows;
for (int i = 0; i < cols; i++) {