This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // note : if you're on github gist and want to copy paste this code, you can click on the "Raw" button | |
| // and then do Ctrl A, Ctrl C, Ctrl V | |
| // (code below by Kurt Spencer, slightly modified code to run as Processing tab) | |
| // maybe you should rather use this new (improved) version of the noise instead : https://github.com/KdotJPG/OpenSimplex2 | |
| /* | |
| * OpenSimplex Noise in Java. | |
| * by Kurt Spencer | |
| * | |
| * v1.1 (October 5, 2014) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Torus 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/ | |
| // See the license information at the end of this file. | |
| final boolean recording = false; | |
| final boolean reverse = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Knots with digits or 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/ | |
| // See the license information at the end of this file. | |
| final boolean recording = true; | |
| final boolean reverse = false; | |
| final boolean draw_digits = true; // Digits or texture? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 2D shape transitions | |
| // | |
| // Mathematics and Processing code by Waldeck Schützer (@infinitymathart) | |
| // Motion blur template by @davidbeesandbombs, explanation/article: https://bleuje.com/tutorial6/ | |
| // Rotater transition by Etienne Jacob (@etinjcb) | |
| // | |
| import complexnumbers.*; | |
| import java.io.BufferedReader; | |
| import java.io.FileReader; | |
| import java.io.IOException; |