Skip to content

Instantly share code, notes, and snippets.

View KrabCode's full-sized avatar

Jakub Rak KrabCode

  • Prague, Czech Republic
  • 06:50 (UTC +01:00)
View GitHub Profile
@KrabCode
KrabCode / hallway.pde
Created January 14, 2018 18:05
experiments with recursion
public void settings() {
// size(800,600);
fullScreen();
}
public void draw(){
background(0);
stroke(255);
fill(0);
drawCircle(width/2, height/2, 500+500*sin(radians(frameCount)));
@KrabCode
KrabCode / recursive.pde
Last active January 14, 2018 22:23
4 quarter circles
public void settings() {
// size(800,600);
fullScreen(P2D);
}
public void draw(){
background(0);
stroke(255);
noFill();
public void settings() {
// size(800,600);
fullScreen();
}
public void setup() {
background(0);
}
@KrabCode
KrabCode / squares.pde
Created January 15, 2018 07:24
squares recursively from zero++ limited by max size
public void settings() {
//size(800,600);
fullScreen(P2D);
}
public void setup(){
}
@KrabCode
KrabCode / recursive_lines.pde
Created January 16, 2018 08:46
recursively smaller lines!
void setup(){
//size(800,600);
fullScreen(P2D);
}
float step ;
void draw(){
background(255);
step = map(mouseX, 0, width, .1f, 1f);
drawRecursively(width/2, height/2, width/3, true);
}
@KrabCode
KrabCode / oscillating_resursive_spiral.pde
Created January 16, 2018 18:12
oscillating resursive spiral
float inputX, inputY;
public void settings() {
// size(800,600);
fullScreen(P2D);
}
public void setup() {
background(0);
@KrabCode
KrabCode / Main.java
Created March 1, 2018 21:55
almost random walkers for Processing on Eclipse or IDEA
import processing.core.PApplet;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ThreadLocalRandom;
public class Main extends PApplet{
public static void main(String[] args) {
PApplet.main("Main");
}
@KrabCode
KrabCode / Koch.pde
Created March 16, 2018 13:18
fun with snowflakes in processing
ArrayList<Line> lines = new ArrayList<Line>();
void setup(){
size(800,800);
background(200);
frameRate(1);
createBaseShape();
strokeWeight(1);
drawLines();
}
@KrabCode
KrabCode / Lines.pde
Last active December 26, 2018 15:15
ArrayList<Line> lines = new ArrayList<Line>();
public void setup(){
size(800,800);
colorMode(HSB);
background(0);
strokeWeight(1);
frameRate(30);
@KrabCode
KrabCode / Umbrella.pde
Created March 16, 2018 15:19
l-systems yeah boii
ArrayList<Line> lines = new ArrayList<Line>();
public void setup(){
size(800,800);
colorMode(HSB);
background(0);
strokeWeight(2);
frameRate(30);
createLine();
drawLines();