Skip to content

Instantly share code, notes, and snippets.

'use strict'
var gif, canvElt,
numFrames = 30,
duration = 1200,
recording = true,
time = 0
;
function setup() {
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);
// by Etienne Jacob, All rights reserved
#include <QCoreApplication>
#include <QImage>
#include <bits/stdc++.h>
using namespace std;
#define FILENAME "rocks.jpg"
#!/bin/sh
# From http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
# Usage:
# ./makegif.sh inputframes output.gif
# where inputframes is a directory containing .png frames
# Change size here
filters="scale=640:-1:flags=lanczos"
@Dan-Piker
Dan-Piker / Moebius3d
Last active February 15, 2025 06:56
Moebius transformations in 3d
//Moebius transformations in 3d, by reverse stereographic projection to the 3-sphere,
//rotation in 4d space, and projection back.
//by Daniel Piker 09/08/20
//Feel free to use, adapt and reshare. I'd appreciate a mention if you post something using this.
//You can also now find this transformation as a component in Grasshopper/Rhino
//I first wrote about these transformations here:
//https://spacesymmetrystructure.wordpress.com/2008/12/11/4-dimensional-rotations/
//If you want to transform about a given circle. Points on the circle and its axis stay on those curves.
//You can skip these 2 lines if you want to always use the origin centred unit circle.
import bpy
import bmesh
import random
from mathutils import Vector, noise, Matrix
from math import sin, cos, tau, pi, radians, sqrt
from utils.interpolation import *
from utils.math import *
from utils.color import *
frame_start = 1
@wschutzer
wschutzer / sketch_240930d_knotdigits.pde
Created October 1, 2024 03:12
Digits on a knot tube
// Digits on a knot tube
// ---------------------
//
// Mathematics and Processing code by Waldeck Schützer (@infinitymathart)
// Motion blur template by @davidbeesandbombs, explanation/article: https://bleuje.com/tutorial6/
// Idea and concept for flipping digits on a surface by @etinjcb
//
import peasy.*;
import processing.core.PMatrix3D;