Skip to content

Instantly share code, notes, and snippets.

View benkiel's full-sized avatar

Ben Kiel benkiel

View GitHub Profile
@simoncozens
simoncozens / sparsify.py
Last active April 26, 2024 17:48
sparsify.py - turn masters into sparse masters
import uuid
from glyphsLib import load, GSPath, GSNode, GSLayer
from fontTools.varLib.models import VariationModel, normalizeValue
import numpy as np
from tqdm import tqdm
import argparse
def interpolate_paths_without(glyph, intermediate_layer, intermediate_location):
tags = [axis.axisTag for axis in glyph.parent.axes]
@justvanrossum
justvanrossum / circlewavegrid.py
Last active June 21, 2016 21:22
Create a wavy animaton with DrawBot
# Physics stolen from:
# http://giphy.com/gifs/wave-circle-point-13ePqdDflwat9e
def blobPos(pt, r, a):
x, y = pt
x += cos(a) * r
y += sin(a) * r
return (x, y)
def drawGrid(cells):