Skip to content

Instantly share code, notes, and snippets.

@manoloide
manoloide / rectShadows.pde
Created January 9, 2018 07:48
Rect Shadows Particles
ArrayList<Rect> rects;
float mx, my, mm, time;
void setup() {
size(720, 720, P2D);
generate();
}
void draw() {
#ifdef GL_ES
precision mediump float;
precision mediump int;
#endif
varying vec4 vertColor;
varying vec3 vertNormal;
varying vec3 vertLightDir;
varying vec4 vertTexCoord;
int seed = int(random(99999999));
//https://ar.pinterest.com/pin/460985711850841261/
void setup() {
size(528, 280);
smooth(8);
frameRate(30);
pixelDensity(2);
strokeCap(SQUARE);
int seed = int(random(999999));
void setup() {
size(960, 960, P2D);
smooth(8);
pixelDensity(2);
rectMode(CENTER);
generate();
int fps = 30;
float seconds = 3;
boolean export = true;
int frames = int(fps*seconds);
float time = 0;
void setup() {
size(640, 640);
smooth(8);
int seed = int(random(999999));
void setup() {
size(960, 960, P3D);
smooth(8);
pixelDensity(2);
generate();
}
int seed = int(random(999999));
void setup() {
size(960, 960, P2D);
smooth(8);
pixelDensity(2);
generate();
}
void arc2(float x, float y, float s1, float s2, float a1, float a2, int col, float alp1, float alp2) {
float r1 = s1*0.5;
float r2 = s2*0.5;
float amp = (a2-a1);
float ma = map(amp, 0, TWO_PI, 0, 1);
int cc = max(2, int(max(r1, r2)*PI*ma));
float da = amp/cc;
for (int i = 0; i < cc; i++) {
float ang = a1+da*i;
beginShape();
void hoja(float x, float y, float s, float ang, int col) {
float w = s*0.3;
float h = int(s);
pushMatrix();
translate(x, y);
rotate(ang);
float pb = 0.8;
float px = 2.2;
int totalIte = 15;
void setup() {
size(600, 600);
generate();
}
void draw() {
}