Skip to content

Instantly share code, notes, and snippets.

View KrabCode's full-sized avatar

Jakub Rak KrabCode

  • Prague, Czech Republic
  • 08:21 (UTC +01:00)
View GitHub Profile
PVector center;
ArrayList<Line> lines = new ArrayList<Line>();
public void setup(){
fullScreen();
noSmooth();
center = new PVector(width/2, height/2);
colorMode(HSB);
background(0);
strokeWeight(1);
ArrayList<Dot> dots;
PVector center;
float lastAngle = 0;
void setup(){
size(1200,800);
center = new PVector(width/2, height/2);
strokeWeight(10);
noSmooth();
noFill();
@KrabCode
KrabCode / MainApp.java
Created April 8, 2018 07:47
Voronoi bubble bath
import processing.core.PApplet;
import processing.core.PVector;
import java.lang.reflect.Array;
import java.util.ArrayList;
public class MainApp extends PApplet{
public static void main(String[] args) {
PApplet.main("MainApp");
import processing.core.PApplet;
import processing.core.PVector;
import java.util.ArrayList;
public class MainApp extends PApplet{
public static void main(String[] args) {
PApplet.main("MainApp");
import processing.core.PApplet;
import processing.core.PGraphics;
import processing.core.PImage;
public class MainApp extends PApplet{
public static void main(String[] args) {
PApplet.main("MainApp");
}
import android.view.MotionEvent;
float damping = .95f;
float[][] prev ;
float[][] curr;
int w;
int h;
int res = 22;
precision highp float;
uniform vec3 resolution;
uniform float time;
uniform float[25] xs;
uniform float[25] ys;
uniform float[25] rs;
uniform float mouseX;
uniform float mouseY;
void main(){
@KrabCode
KrabCode / MainApp.java
Last active May 24, 2018 14:38
uses stars.glsl
ArrayList<Blob> blobs;
PShader pShader;
float gameSpeed = 1;
public void setup() {
fullScreen(P2D, 2);
blobs = new ArrayList<Blob>();
for (int i = 0; i < 25; i++) {
blobs.add(new Blob(random(width), random(height)));
}
void setup() {
//size(800,600);
fullScreen();
colorMode(HSB, 100);
background(0);
}
void draw() {
noStroke();
fill(0,1);
//TODO screenshot
ArrayList<Touch> ts = new ArrayList<Touch>();
PGraphics canvas;
float hueDegrees = 0;
void setup() {
fullScreen(P2D);
canvas = createGraphics(width, height, P2D);
canvas.beginDraw();