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
board = ''' | |
m a i n v f | |
a n a f d d | |
s m i t h a | |
i r o n r v | |
e m o z a i | |
a e e t a d | |
''' |
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
# -*- coding: utf-8 -*- | |
# Copyright (c) Vispy Development Team. All Rights Reserved. | |
# Distributed under the (new) BSD License. See LICENSE.txt for more info. | |
""" | |
Demonstration of InfiniteLine visual. | |
""" | |
import sys | |
import numpy as np |
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 | |
############################################################################### | |
# Action Happens Here 50 times per second | |
def tick(i): | |
#glRotatef(1, 0, 0, 1) | |
#glTranslatef(0, 0, 1) |
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 | |
"""Draw a cube on the screen. every frame we orbit | |
the camera around by a small amount and it appears | |
the object is spinning. note i've setup some simple | |
data structures here to represent a multicolored cube, | |
we then go through a semi-unopimized loop to draw | |
the cube points onto the screen. opengl does all the | |
hard work for us. :] | |
""" |
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
""" | |
It's worth pointing out that python complex numbers are great for storing positions, | |
sizes, momentum, and polar/rect calculations. See the cmath module for details. | |
""" | |
from random import random | |
import sys | |
import math | |
from cmath import polar, rect |