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
# Copyright (c) 2013, Federico Antonini e Roberto Arista | |
# MIT License | |
# Hapax script | |
### Opening libraries | |
import string | |
import re | |
import sys | |
from operator import itemgetter |
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
################################ | |
# Gaze positions visualization # | |
################################ | |
### Modules | |
import numpy | |
import sys | |
from operator import itemgetter | |
### Functions |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
################################################# | |
# Organizing images by dominant colors with PIL # | |
################################################# | |
### Modules | |
from PIL import Image, ImageStat | |
import os |
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
#################################### | |
# Typeface oriented grid generator # | |
#################################### | |
""" | |
Usage: | |
- open .py file with Drawbot (drawbot.readthedocs.org) and launch | |
- use what the script prints out to set your InDesign document | |
""" |
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
### Module | |
from robofab.world import OpenFont | |
### Functions | |
def drawCon(con): | |
bezierPath = BezierPath() | |
# Iteration over segments | |
for seg in con: |
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
void drawPoly(float x, float y, float radius, int numEdges) { | |
float arc = TWO_PI / numEdges; | |
beginShape(); | |
for (int i=0; i<numEdges; i++) { | |
float a = arc * i; | |
float px = x + cos(a) * radius; | |
float py = y + sin(a) * radius; |
NewerOlder