Skip to content

Instantly share code, notes, and snippets.

@GusGusGusGus
GusGusGusGus / IsometricLiquidRipple
Created June 14, 2018 23:10
Isometric perspective ripple animation
let angle = 0;
let w = 20; // largura
let ma; //angulo necessário para a perspectiva isométrica
let maxD;
function setup(){
createCanvas(400,400, WEBGL);
ma = atan(1/sqrt(2));
maxD = dist(0, 0, 200, 200);
@GusGusGusGus
GusGusGusGus / IsometricWaves
Created June 14, 2018 23:07
Isometric perspective wave animation
let angle = 0;
let w = 24; // largura
let ma;
function setup(){
createCanvas(400,400, WEBGL);
ma = atan(1/sqrt(2));
}
@GusGusGusGus
GusGusGusGus / BounceBallWITHVECTOR
Created June 14, 2018 23:05
Bouncing ball with vectors
PVector location;
PVector velocity;
void setup() {
size(400, 400);
smooth();
location = new PVector(100, 100);
velocity = new PVector(6, 5);
}
void draw() {
//[full] Variables for location and speed of ball.
float x = 100;
float y = 100;
float xspeed = 5;
float yspeed = 3.3;
//[end]
//[full] Remember how Processing works? setup() is executed once when the sketch starts and draw() loops forever and ever (until you quit).
void setup() {
size(640,360);
@GusGusGusGus
GusGusGusGus / PerlinLandscape
Created June 14, 2018 23:01
Perlin Noise Auto-Generated Landscape Pattern
int cols, rows;
int scl= 20; // escala
int w = 2000;
int h = 1600;
float flying = 0;
float[][] terrain;
void setup(){
size(500, 500, P3D);
@GusGusGusGus
GusGusGusGus / PerlinCloud
Created June 14, 2018 22:56
Perlin Cloud
float increment= 0.01;
float zoff = 0.0;
float zincrement= 0.02;
void settings(){
size(800, 800);
}
void draw() {
@GusGusGusGus
GusGusGusGus / Main
Last active June 14, 2018 22:54
Random Perlin Noise Walker Vectorized
Walker w;
void settings() {
size(800,700);
}
void setup() {
frameRate(100);
@GusGusGusGus
GusGusGusGus / spots
Created June 14, 2018 22:50
Gaussian Random Spots
color c;
void setup() {
size(800, 800);
colorMode(HSB, 360, 100, 100);
background(#000000);
}
void draw() {
@GusGusGusGus
GusGusGusGus / RainbowStar
Created June 14, 2018 22:49
Rainbow star
float[] distributionA = new float[360];
float[] distributionB = new float[360];
int v1 = 0;
int v2 = 0;
int v3 = 0;
int alpha = 0;
void setup() {
size(500, 500);
@GusGusGusGus
GusGusGusGus / mySketch
Created June 14, 2018 22:48
Normally Distributed Random X Points
float num;
void setup() {
size(800, 800);
background(150);
smooth();
}