Skip to content

Instantly share code, notes, and snippets.

View wschutzer's full-sized avatar

Waldeck Schützer, Ph.D. wschutzer

View GitHub Profile
@wschutzer
wschutzer / sketch_241023a_canyon.pde
Last active October 24, 2024 14:19
Canyon with texture
// Canyon with texture
//
// Processing code and Mathematics by Waldeck Schutzer (@infinitymathart)
// Based on code by Etienne Jacob (@etinjcb)
// Motion blur template by @davebeesandbombs, explanation/article: https://bleuje.com/tutorial6/
// OpenSimplexNoise.pde can be found here: https://gist.github.com/wschutzer/4be8f14d12fc3541024f796ee7fb6fe2
// See the license information at the end of this file.
final boolean recording = false;
final boolean reverse = false;
@wschutzer
wschutzer / SpectrogramReader.pde
Created October 29, 2024 23:23
Moonlight Sonata Waterfall
import java.io.*;
import java.nio.*;
class SpectrogramReader {
float[] frequencies; // Array of frequencies in Hz
float[] minValues; // Min values for each frequency bin
float[] maxValues; // Max values for each frequency bin
int numFrequencies; // Number of frequency bins
int sampleRate;
int totalPackets;
@wschutzer
wschutzer / data_dice2.mtl
Created October 31, 2024 04:32
Rolling dice
# Blender 4.1.1 MTL File: 'None'
# www.blender.org
newmtl dice.body
Ns 10.000005
Ka 1.000000 1.000000 1.000000
Kd 1.000000 1.000000 1.000000
Ks 1.000000 1.000000 1.000000
Ke 0.000000 0.000000 0.000000
Ni 1.500000
#include "OpenSimplexNoise.h"
#include <cmath>
namespace OpenSimplexNoise
{
using namespace std;
Noise::Noise()
: m_stretch2d(-0.211324865405187) //(1/Math.sqrt(2+1)-1)/2;
, m_squish2d(0.366025403784439) //(Math.sqrt(2+1)-1)/2;
@wschutzer
wschutzer / starreader.js
Created November 19, 2024 15:31
Simulation reader
async function readLargeFile(url) {
const response = await fetch(url);
const reader = response.body.getReader();
const decoder = new TextDecoder();
let remainingData = "";
while (true) {
const { done, value } = await reader.read();
if (done) break;
@wschutzer
wschutzer / motion_blur_template.pde
Last active November 23, 2024 19:59
Motion Blur Template
/* Motion Blur Template
* ---------------------
* This code uses shaders to aproximate the motion blur effect by averaging the pixels along a sequence
* of frames.
*
* Copyright (C) 2024 Waldeck Schutzer (@infinitymathart)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
/* Love Equation
* ---------------------
*
* Copyright (C) 2024 Waldeck Schutzer (@infinitymathart)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
@wschutzer
wschutzer / OpenSimplexNoise.cpp
Created December 4, 2024 19:35
OpenSimplexNoise
#include "OpenSimplexNoise.h"
#include <cmath>
namespace OpenSimplexNoise
{
using namespace std;
Noise::Noise()
: m_stretch2d(-0.211324865405187) //(1/Math.sqrt(2+1)-1)/2;
, m_squish2d(0.366025403784439) //(Math.sqrt(2+1)-1)/2;
@wschutzer
wschutzer / ofApp.cpp
Created December 4, 2024 19:41
delayedcurves7
/*
* delayedcurves7
* --------------
* This code creates an animation consisting of colored balls moving according to random noise (OpenSimplexNoise)
* The balls are connected with flexible lines that follow the movement with some delay.
*
* Copyright (C) 2024 Waldeck Schutzer (@infinitymathart)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@wschutzer
wschutzer / sketch_241219a_wavetorus.pde
Created December 21, 2024 22:32
Waves and digits on a torus - inside view, like a tunnel
/* Waves and digits on a torus (inside view)
* -----------------------------------------
* Requires OpenSimplexNoise, available here: https://gist.github.com/wschutzer/4be8f14d12fc3541024f796ee7fb6fe2
* Download OpenSimplexNoise.pde and place it in the same folder of this file.
*
* Copyright (C) 2024 Waldeck Schutzer (@infinitymathart)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or