Skip to content

Instantly share code, notes, and snippets.

bsutherland /
Created Jun 10, 2014
Assorted utilities for representing and rendering 2d geometry using Python / OpenGL, including a general purpose Tree, 2D Vector, Rectangle etc.
import math
import numpy
import random
class Vector2(object):
""" A general purpose 2d vector """
def __init__(self, x, y):
self._x = x