This file contains 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
# Generate a jellyfish-like pulsating blobby animation. | |
from random import seed | |
def varyPoint(pt, radius, phase): | |
x, y = pt | |
dx = radius * cos(phase) | |
dy = radius * sin(phase) | |
return x + dx, y + dy |
This file contains 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
# quick and dirty auto start points | |
# set a command+shift+t keyboard shortcut to match prepolator | |
def getKey1(item): return item[1] | |
def getKey0(item): return item[0] | |
g = glyph = CurrentGlyph() | |
g.prepareUndo("Lazy Startpoint") |
This file contains 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
from math import sin, pi, degrees, radians | |
def print_angles(step=8, rad_shift=0, deg_shift=0): | |
shift = rad_shift or radians(deg_shift) | |
for i in range(step + 1): | |
radians_in_circle = 2*pi | |
degrees_in_circle = 360 | |
phase_in_r = radians_in_circle * (i/step) |