Skip to content

Instantly share code, notes, and snippets.

View eliheuer's full-sized avatar

Eli Heuer eliheuer

View GitHub Profile
@eliheuer
eliheuer / py_kata_eliheuer_01_01_16.py
Created January 2, 2016 19:34
Daily Python kata rendered with Drawbot
#!
# render with drawbot
# forked from https://gist.github.com/justvanrossum/bde7e9b5ae5f9b67dd52
canvas = 512 # canvas size
sq_size = 32 # square size
sq_num = 32 # number of squares
sq_dist = 24 # distance between squares
# used to center the object
width = sq_num * sq_dist
@eliheuer
eliheuer / code_kata_eliheuer_01_02_16.py
Created January 2, 2016 22:51
Daily Python kata rendered with Drawbot
# fork of -- https://gist.github.com/justvanrossum/19cf56af4ccb2477a868
# from http://dailydrawbot.tumblr.com/
#rendered with drawbot
# FREQUENCY = 1
# http://dailydrawbot.tumblr.com/post/135252661206/the-blob
# FREQUENCY = 2
# http://dailydrawbot.tumblr.com/post/135266061309/the-blob-2
# Daily Python Kata
# 01/02/16 -- 002
canvas = 2**9
count = 1
frame_count = 50
for i in range(frame_count):
newPage(canvas, canvas)
frameDuration(1/20)
image("ss.png", (0, 0))
# Eli Heuer's daily DrawBot exercise!
# 01/19/16 -- 001
# Rendered with DrawBot:
# http://www.drawbot.com/
# This code started from this tutorial screencast:
# https://vimeo.com/149247423
# Thanks to Just van Rossum
# setting up the canvas and main variables
# Eli Heuer's daily DrawBot exercise!
# 01/21/16 -- 001
# Rendered with DrawBot:
# http://www.drawbot.com/
# setting up the canvas and main variables
canvas = 512 # size of the gif in pixels
square_size = 128 # size of the square
num_frames = 64 # number of frames in the animation
@eliheuer
eliheuer / 2017-jan-05.gif.py
Created January 6, 2017 05:12
2017-jan-05.gif source, render with DrawBot.
# GIF file rendered with DrawBot: http://www.drawbot.com/
import math
import itertools
# static variables
canvas = 512
num_frames = 60
# gird variables
from drawBot import *
print installedFonts()
# set the path to a font file
path = "/Users/name/drawbot/font.otf"
fontName = installFont(path)
canvas = 512
import bpy
import random
import math
scene = bpy.context.scene
# add metaball object
mball = bpy.data.metaballs.new("MetaBall")
obj = bpy.data.objects.new("MetaBallObject", mball)
step = 0
import bpy
import random
import math
scene = bpy.context.scene
# add metaball object
mball = bpy.data.metaballs.new("MetaBall")
obj = bpy.data.objects.new("MetaBallObject", mball)
step = 1.2
@eliheuer
eliheuer / blender-metaball-test-002.py
Created May 29, 2017 16:19
Blender Metaball Test 002
import bpy
import math
scene = bpy.context.scene
# add metaball object
mball = bpy.data.metaballs.new("MetaBall")
obj = bpy.data.objects.new("MetaBallObject", mball)
step = 0
pull = 0