Skip to content

Instantly share code, notes, and snippets.

View peternewman22's full-sized avatar

Mr Human peternewman22

  • Australia
View GitHub Profile
// Interesting playing around with different ways of changing m and n
// Inspired by the Steve Mould video: https://www.youtube.com/watch?v=rjueHI002Fg
// Next steps: implement with a shader
float n = 100;
float m = 1;
float epsilon = 0.1;
float res;
int count = 500;
float increment = 0.001;
String currentlyAdjusting = "n";
import PySimpleGUI as sg
import sqlite3
from datetime import timedelta, datetime
from enum import Enum
from collections import defaultdict
from typing import List, Tuple, Callable
import logging
logging.basicConfig(filename="main.log", filemode='w', level=logging.DEBUG, format='%(name)s - %(levelname)s - %(message)s')
@peternewman22
peternewman22 / Hex.pde
Created July 30, 2021 06:45
Reusing some tiling code and experimenting with triggering a cycle in each hex to get the ripple effect
class Hex {
PVector pos;
int state;
float a; // tracking point in the cycle
float thisR; // current radius
float dist2c;
Hex(float x, float y) {
pos = new PVector(x, y);
state = 1;
@peternewman22
peternewman22 / ChaikinCurveSubdivision.pde
Created July 19, 2021 08:00
ChaikinCurveSubdivision implementation and animation
// music from https://audionautix.com/free-music/meditative
import processing.sound.*;
SoundFile file;
int ptCount, stop;
PVector[] cpts0;
int everyXFrames;
int level;
Curve[] curves;