Skip to content

Instantly share code, notes, and snippets.

View Nekodigi's full-sized avatar

Nekodigi

View GitHub Profile
PImage img;
float r;//kaleidoscope radius
float angle = radians(45);//" angle
float imgAngleOff = 0;//offset angle when uv mapping
void setup(){
size(500, 500, P3D);
r = height/2;
img = loadImage("FujiPD.jpg");
noStroke();textureMode(NORMAL);
float noiseS = 500;//noise scale
float noiseP = 1;//noise power
int iter = 100;//move iteration
PVector p;//particle
void setup(){
size(500, 500);
p = new PVector(100, height/2);
ellipse(p.x, p.y, 10, 10);
for(int i=0; i<iter; i++){
Ball ball;
ArrayList<Block> blocks = new ArrayList<Block>();
int bs = 100;//block size
int ni, nj;
void setup(){
fullScreen();
//size(1000, 1000);
ball = new Ball(new PVector(width/2, height/2+bs+EPSILON), new PVector(20, 10), bs/2);
ni = width/bs;
@echo off
for /f %%A in ('dir /a-d-s-h /s /b *.pde ^| find /v /c ""') do set cnt=%%A
echo File count = %cnt%
//based on these site
//https://www.youtube.com/watch?v=n4AQ3yj3L4w
//patarnott.com/pdf/SnowCrystalGrowth.pdf
float initHum = 0.35;//humidity of initial grid(beta) 0.4
float randHum = 0.00;//randomize humidity
float blurW = 1;//blur weighting factor(alpha)2
float addCont = 0.001;//add himidity to ice(gamma)0.001
int subStep = 50;
int step;
//Inspired by this video https://www.youtube.com/watch?v=H3UqKe_Bwoc
import ddf.minim.*;
import ddf.minim.analysis.*;
float timeGoAround = 100;
Minim minim;
AudioInput in;
FFT fft;
AudioPlayer player;
float zoff = 0;
void setup(){
//fullScreen();
//size(1000, 1000);
size(500, 500);
blendMode(ADD);
}
void draw(){
float gSize=10;//grid size
void setup(){
size(500, 500);
background(255);
fill(0);
noStroke();
int x1 = 10;
int y1 = 10;
int x2 = 20;
int res = 100;
int gen = 20;//to store generation
float baseR = 2;
float[][] prevRs = new float[gen][res];
void setup(){
//fullScreen();
size(500, 500);
colorMode(HSB, 360, 100, 100);
}
PImage img;
PGraphics canvas;
void setup(){
size(500, 500);
img = loadImage("Nurie Test.png");
img.resize(width, height);
canvas = createGraphics(width, height);
colorMode(RGB, 255, 255, 255, 1);
//image(img, 0, 0, width, height);