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
import time, math | |
from pyglet.gl import * | |
window = pyglet.window.Window() | |
class AlphaSquare: | |
def __init__(self, color): | |
self.xpos = 0 | |
self.ypos = 0 | |
self.color = color |
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
import time, math | |
from pyglet.gl import * | |
window = pyglet.window.Window() | |
class AlphaSquare2: | |
def __init__(self, color1, color2): | |
self.xpos = 0 | |
self.ypos = 0 | |
colors = color1 + color1 + color2 + color2 |
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
import time, math | |
from pyglet.gl import * | |
window = pyglet.window.Window() | |
class Square: | |
def __init__(self, color): | |
self.color = color | |
self.vlist = pyglet.graphics.vertex_list(4, ('v2f', [-128,-128, 128,-128, -128,128, 128,128])) | |
def draw(self): |
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
import time, math | |
from pyglet.gl import * | |
window = pyglet.window.Window() | |
class AlphaSquare: | |
def __init__(self, color): | |
self.xpos = 0 | |
self.ypos = 0 | |
self.color = color |
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
import time, math | |
from pyglet.gl import * | |
window = pyglet.window.Window() | |
class TexAlphaSquare: | |
def __init__(self, width, height, xpos, ypos, texturefile, color): | |
self.xpos = xpos | |
self.ypos = ypos |
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
import time, math | |
from pyglet.gl import * | |
window = pyglet.window.Window() | |
class BlendFilter: | |
def __init__(self, srcFunc, destFunc, color): | |
self.srcFunc = srcFunc | |
self.destFunc = destFunc |
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
import sys, time, math | |
from pyglet.gl import * | |
from euclid import * | |
window = pyglet.window.Window(512,512) | |
quadric = gluNewQuadric() | |
ballPos = Vector2(256,256) | |
ballVel = Vector2(200,145) |
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
import sys, time, math | |
from pyglet.gl import * | |
from euclid import * | |
window = pyglet.window.Window(512,512) | |
quadric = gluNewQuadric() | |
ballPos = Vector2(256, 256) | |
ballVel = Vector2(80, 0) |
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
import sys, time, math | |
from pyglet.gl import * | |
from euclid import * | |
GRAV_CONSTANT = 1 | |
window = pyglet.window.Window(512,512) | |
def makeCircle(numPoints): | |
verts = [0,0] |
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
import sys, time, math | |
from pyglet.gl import * | |
from euclid import * | |
window = pyglet.window.Window(512,512) | |
point0 = Vector2(100, 240) | |
velocity0 = Vector2(0, 0) | |
mass0 = 1 | |
point1 = Vector2(300, 240) |