Skip to content

Instantly share code, notes, and snippets.

View reuk's full-sized avatar
🍹
there's no I in JUCE

reuk reuk

🍹
there's no I in JUCE
View GitHub Profile
@reuk
reuk / lorenz.pde
Created March 26, 2015 16:33
Simple lorenz system in Processing.
class Lorenz
{
Lorenz()
{
final float SIZE = 10;
PVector p = new PVector(random(-SIZE/2, SIZE), random(-SIZE/2, SIZE), random(-SIZE/2, SIZE));
for (int i = 0; i != positions.length; ++i)
{
positions[i] = p;
}
void setup()
{
size(500, 500, P3D);
colorMode(RGB, 1);
frameRate(25);
logo = loadImage("logo.png");
logo.filter(INVERT);
}
@reuk
reuk / LinkedList.c
Created February 16, 2014 17:23
Super simple non-type-safe linked-list implementation in C, because I got bored.
//
// LinkedList.c
// LinkedList
//
// Created by Reuben Thomas on 16/02/2014.
// Copyright (c) 2014 Reuben Thomas. All rights reserved.
//
#include "LinkedList.h"
#include <stdlib.h>
@reuk
reuk / dof.pde
Created January 19, 2014 17:09
Terrible depth-of-field effect for Processing.
void setup()
{
size (500, 500);
colorMode (RGB, 1);
frameRate (25);
}
final int LAYERS = 5;
final int LOOP_LENGTH = 100;
//
// main.cpp
// functional
//
// Created by Reuben Thomas on 08/01/2014.
// Copyright (c) 2014 Reuben Thomas. All rights reserved.
//
#include <iostream>
#include <vector>
@reuk
reuk / tetra.pde
Created December 19, 2013 21:01
Sierpinski pyramid zoom
//PImage logo;
void setup() {
size(500, 500, P3D);
colorMode(RGB, 1);
frameRate(25);
// logo = loadImage("logo.png");
// logo.filter(INVERT);
}
@reuk
reuk / möbius.pde
Last active December 25, 2015 03:09
void setup() {
size(500, 500, P3D);
frameRate(25);
colorMode(RGB, 1);
fill(0);
stroke(0, 1, 1);
noSmooth();
strokeWeight(2);
}
@reuk
reuk / sevenLanguages_ruby_day3.rb
Created October 6, 2013 13:50
I've been learning ruby. I liked it more than I thought I would.
#!/usr/bin/env ruby
module ActsAsCsv
def self.included(base)
base.extend ClassMethods
end
module ClassMethods
def acts_as_csv
@reuk
reuk / hyper.pde
Created September 22, 2013 17:52
hypercube, implementation inspired by http://steve.hollasch.net/thesis/chapter4.html
class Vec4 {
float x, y, z, w;
Vec4(float a, float b, float c, float d) {
x = a;
y = b;
z = c;
w = d;
}
void setup() {
size(500, 500, P3D);
blendMode(ADD);
noFill();
strokeWeight(2);
frameRate(25);
}
void draw() {
background(0);