In the differential geometry of curves, a roulette is a kind of curve, generalizing cycloids, epicycloids, hypocycloids, trochoids, and involutes.
This p5.js sketch implements hypotrochoid and epicycloid roulettes.
def distinct(iterable, keyfunc=None): | |
seen = set() | |
for item in iterable: | |
key = item if keyfunc is None else keyfunc(item) | |
if key not in seen: | |
seen.add(key) | |
yield item | |
if __name__ == '__main__': | |
x = [0, 0, 1, 0, 1, 2, 2, 1, 0] |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style>body {padding: 0; margin: 0; overflow: hidden;}</style> | |
</head> | |
<body> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.6.2/dat.gui.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.5/p5.min.js"></script> |
act | |
air | |
ant | |
arm | |
art | |
bag | |
bat | |
bed | |
bee | |
bit |
- Install & launch | |
$ brew install syncthing | |
$ brew services start syncthing | |
- Install it on your Linode or whatever too | |
- https://apt.syncthing.net/ | |
- Visit local dashboard at http://localhost:8384/ | |
- Click `Add Remote Device` to sync with another machine |
import cairocffi as cairo | |
import numpy as np | |
import random | |
def random_coefs(order, sigma): | |
return [random.gauss(0, sigma) for _ in range(order)] | |
def random_transform(): | |
y_dx = random_coefs(5, 0.3) | |
y_dy = random_coefs(5, 0.3) |
In the differential geometry of curves, a roulette is a kind of curve, generalizing cycloids, epicycloids, hypocycloids, trochoids, and involutes.
This p5.js sketch implements hypotrochoid and epicycloid roulettes.
from PIL import Image | |
from pyhull.delaunay import DelaunayTri | |
from shapely import geometry | |
from skimage import measure | |
from scipy import interpolate | |
import math | |
import numpy as np | |
import struct | |
import sys |
#include <stdint.h> | |
#include <stdio.h> | |
typedef union { | |
uint32_t a; | |
float b; | |
} float_or_int; | |
int main() { | |
float_or_int u; |
package main | |
import ( | |
"image" | |
"image/color" | |
"math" | |
"math/cmplx" | |
"github.com/fogleman/fauxgl" | |
"github.com/fogleman/gg" |
package main | |
import ( | |
"fmt" | |
"image" | |
"image/draw" | |
"image/png" | |
"math" | |
"os" |