Skip to content

Instantly share code, notes, and snippets.

View reona396's full-sized avatar

reona396 reona396

View GitHub Profile
void setup() {
size(400, 400, P3D);
}
void draw() {
background(230, 230, 230);
pushMatrix();
translate(width/2, height/2);
rotateX(frameCount * 0.01);
PImage img;
void setup() {
size(400, 400);
img = loadImage("./photo.jpg");
}
void draw() {
image(img, 0, 0);
Jitter[] bugs = new Jitter[50];
void setup() {
size(710, 400);
for (int i = 0; i < bugs.length; i++) {
bugs[i] = new Jitter();
}
}
void setup() {
size(400, 400);
}
void draw() {
background(230);
pushMatrix();
translate(100, 100);
rotate(radians(30));
int a = 2;
int b = 3;
void setup() {
println(sum(a, b));
println(isEvenNumber(a));
println(makeText(a, b));
int ellipseSize = 50;
float ellipseX = 100;
float ellipseY = 200;
void setup() {
size(400, 400);
}
void draw() {
@reona396
reona396 / edgeSample.js
Created September 2, 2020 11:01
p5.js + filter_sobel.js
let img;
var w = 800;
var h = 450;
function preload() {
img = loadImage('pict.png');
}
function setup() {
int startX, goalX;
int r = 25;
int circleNum = 3;
Circle[] circles = new Circle[circleNum];
void setup() {
size(400, 300);
startX = 50;
goalX = width - 50;
// http://icooon-mono.com/11088/
PShape shape;
int fishNum = 50;
Fish[] fish = new Fish[fishNum];
void setup() {
size(800, 600);
colorMode(HSB, 360, 100, 100);
let interval;
const buttonMapping = {
0: 'A',
1: 'X',
2: 'B',
3: 'Y',
4: 'RSL',
5: 'RSR',
9: 'PLUS',