Skip to content

Instantly share code, notes, and snippets.

(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 / harmonograph.pde
Created March 23, 2017 12:42
Harmonograph + noise
// http://generateme.tumblr.com
// Harmonograph with noise
// space - save
// click - change
float time;
float f1,f2,f3,f4;
float p1,p2,p3,p4;
float a1,a2,a3,a4;
@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);
}
@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 / mccc_nov_2016.pde
Created November 4, 2016 21:47
MCCC Nov 2016 submission
// generateme.tumblr.com
// mccc Nov 2016
// the main idea:
// SOUND
// - generate sound with 8bit audio formula (concept: http://countercomplex.blogspot.com/2011/10/algorithmic-symphonies-from-one-line-of.html)
// - left channel, values from formula, right channel reversed ulaw
// - equalize (more bass, less treble)
// - add delay
// - save as RAW 8bit signed, stereo, 24576 samples per second
@tsulej
tsulej / noise3d.pde
Last active February 8, 2018 10:40
noise3d sculptures generator
// Noise3d Generator
// generateme.tumblr.com
// setup below
// - click to change object
// - move mouse to rotate
// - press space to save (image and obj file)
// - press + to zoom in
// - press - to zoom out
@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
// [email protected]
// http://generateme.tumblr.com/
// http://folds2d.tumblr.com/
LowpassFilter lpf1, lpf2, lpf3;
@tsulej
tsulej / object_mccc_sep16.pde
Created September 13, 2016 13:49
The Object MCCC Sep 16
// The Object
//
// GenerateMe submission to MCCC Sep 2016
// [email protected]
// http://generateme.tumblr.com/
// http://folds2d.tumblr.com/
void setup() {
size(540, 540);
@tsulej
tsulej / additional_batch.pde
Last active November 12, 2020 17:09
Batch processing for GenerateMe scripts
// STEP 2
// FIND draw() FUNCTION AND ADD
// if (doBatch) { batchStep(); }
// NEAR THE END OF THE FUNCTION.
// FOR UNFAMILIAR PPL: THE END OF THE FUNCTION IS NEAR THE CLOSING (MATCHING) CURLY BRACKET
// HERE IS THE EXAMPLE:
void draw() {
// HERE IS SOMETHING