This file contains hidden or 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
| import sys, time, math | |
| from pyglet.gl import * | |
| from euclid import * | |
| from Spring import * | |
| window = pyglet.window.Window(512,512) | |
| GravityAccel = Vector3(0, -98, 0) | |
| AirDrag = 2 | |
| BounceCoeff = 0.8 |
This file contains hidden or 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 pyglet.gl import * | |
| from euclid import * | |
| class PointMass: | |
| def __init__(self, position, velocity, mass): | |
| self.position = position.copy() | |
| self.velocity = velocity.copy() | |
| self.mass = mass | |
| self.force = Vector3(0, 0, 0) | |
| self.mobile = True |
This file contains hidden or 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
| import sys, time, math | |
| from pyglet.gl import * | |
| from euclid import * | |
| from Spring import * | |
| window = pyglet.window.Window(512,512) | |
| GravityAccel = Vector3(0, -98, 0) | |
| AirDrag = 2 | |
| BounceCoeff = 0.8 |
This file contains hidden or 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
| import sys, time, math, random | |
| from pyglet.gl import * | |
| window = pyglet.window.Window() | |
| keys = pyglet.window.key.KeyStateHandler() | |
| window.push_handlers(keys) | |
| class BoundCircle: | |
| def __init__(self, center, radius): |
This file contains hidden or 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
| import sys, random | |
| from pyglet.gl import * | |
| width = 400 | |
| height = 400 | |
| singlebuffered = pyglet.gl.Config(double_buffer=False) | |
| window = pyglet.window.Window(width,height,config=singlebuffered) | |
This file contains hidden or 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
| import sys, random | |
| from pyglet.gl import * | |
| window = pyglet.window.Window(500,500) | |
| seed = int(random.uniform(0,10000)) | |
| if len(sys.argv) > 1: | |
| seed = int(sys.argv[1]) | |
| def generateHeights(level): |
This file contains hidden or 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
| import sys, random | |
| from pyglet.gl import * | |
| window = pyglet.window.Window() | |
| tex = pyglet.image.load('glow.png').get_texture() | |
| sound = pyglet.media.load('zap.wav') | |
| player = pyglet.media.Player() | |
| player.queue(sound) | |
| player.eos_action = player.EOS_LOOP |
This file contains hidden or 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 pyglet.gl import * | |
| f = open('places2k.txt') | |
| lines = f.readlines() | |
| f.close() | |
| verts = [] | |
| for l in lines: | |
| pop = int(l[73:82]) |
This file contains hidden or 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 pyglet.gl import * | |
| from math import * | |
| f = open('places2k.txt') | |
| lines = f.readlines() | |
| f.close() | |
| verts = [] | |
| for l in lines: |
This file contains hidden or 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 pyglet.gl import * | |
| from math import * | |
| tex = pyglet.image.load('biosphere.png').get_texture() | |
| step = 10 | |
| vlists = [] | |
| for lat in range(-90,90,step): | |
| verts = [] |