Skip to content

Instantly share code, notes, and snippets.

@tsulej
tsulej / lattice.pde
Created December 1, 2016 07:36
Fake delaunay
PImage img;
final static int[][] kernel = {
// { 6,10,0}, {10,0,-10}, {0,-10,-6}
{2,2,0},{2,0,-2},{0,-2,-2}
};
int sample_size = 20; // points are chosen in grid sample_size x sample_size
int thr = 70; // edge threshold, lower - more point, higher - less
@tsulej
tsulej / collatz.pde
Created January 4, 2017 21:48
Collatz visualized
// collatz conjecture visualization
// generateme.tumblr.com
void setup() {
size(2048, 500);
background(20);
stroke(220, 100);
strokeWeight(0.6);
smooth(8);
}
(ns twelve-plus-eight
(:require [clojure2d.core :refer :all]
[clojure2d.math :as m]
[clojure2d.math.vector :as v]))
(def ^:const max-lines 40)
(def ^:const num-points 60)
(def thetas (range 0 m/TWO_PI (/ m/PI 60.0)))
(defn squircle
@tsulej
tsulej / dots2.pde
Last active September 13, 2017 17:57
dots2 code for MCCC Project
// DOTS2 example code for http://mcreativecoding.tumblr.com project
// Tomasz Sulej, generateme.blog@gmail.com
// http://generateme.tumblr.com
// @2015
// move mouse to change visualisation
// click to change parameters
// space to save animation frames
@tsulej
tsulej / deploy.prototxt
Created August 8, 2015 23:10
Train your own net prototxt files
name: "MYNET"
input: "data"
input_dim: 1
input_dim: 3
input_dim: 224
input_dim: 224
layer {
name: "conv1/7x7_s2"
type: "Convolution"
bottom: "data"
@tsulej
tsulej / createIndexFiles.sh
Last active November 14, 2016 22:51
Bash scripts for preparing images for deep neural network training
#!/bin/bash
# script creates train.txt and val.txt prepared by processImages.sh script
# it assumes that all images are processed and there are 10 images minimum in each category
results_folder="images"
rm train.txt
rm val.txt
@tsulej
tsulej / ball3d.pde
Created October 11, 2016 11:15
draw noisy ribbon on sphere - 3d study
// http://generateme.tumblr.com
final static int off = 1000; // set between 0 to 4500 to see related timeframes
final static boolean doblur = false ;
final static float ystep = TWO_PI/700.0;
final static float xstep = TWO_PI/500.0;
void setup() {
size(800,800,P3D);
smooth(8);
// The Object 2
//
// GenerateMe submission to MCCC Sep 2016
// generateme.blog@gmail.com
// http://generateme.tumblr.com/
// http://folds2d.tumblr.com/
LowpassFilter lpf1, lpf2, lpf3;
PGraphics g ;
void setup() {
size(500,500);
smooth(8);
noStroke();
fill(0);
g = createGraphics(270,270);
g.beginDraw();
g.background(255);
@tsulej
tsulej / caustics.pde
Created June 22, 2016 22:19
Caustics
// see: https://github.com/hamoid/Fun-Programming/blob/master/processing/ideas/2016/02/caustic/caustic.pde
void setup() {
size(1000,1000);
smooth(3);
background(240);
fill(10,20,30,10);
noStroke();
frameRate(1000);
}