Skip to content

Instantly share code, notes, and snippets.

View twelve_plus_eight.clj
(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 Mar 23, 2017
Harmonograph + noise
View harmonograph.pde
// 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 Jan 4, 2017
Collatz visualized
View collatz.pde
// collatz conjecture visualization
// generateme.tumblr.com
void setup() {
size(2048, 500);
background(20);
stroke(220, 100);
strokeWeight(0.6);
smooth(8);
}
View lattice.pde
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 Nov 4, 2016
MCCC Nov 2016 submission
View mccc_nov_2016.pde
// 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 Feb 8, 2018
noise3d sculptures generator
View noise3d.pde
// 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 Oct 11, 2016
draw noisy ribbon on sphere - 3d study
View ball3d.pde
// 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);
View object2_mccc_sep16.pde
// 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;
@tsulej
tsulej / object_mccc_sep16.pde
Created Sep 13, 2016
The Object MCCC Sep 16
View object_mccc_sep16.pde
// The Object
//
// GenerateMe submission to MCCC Sep 2016
// generateme.blog@gmail.com
// http://generateme.tumblr.com/
// http://folds2d.tumblr.com/
void setup() {
size(540, 540);
@tsulej
tsulej / additional_batch.pde
Last active Nov 12, 2020
Batch processing for GenerateMe scripts
View additional_batch.pde
// 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