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
## Creates a gamma-corrected lookup table | |
import math | |
def gamma(nsteps, gamma): | |
gammaedUp = [math.pow(x, gamma) for x in range(nsteps)] | |
return [x/max(gammaedUp) for x in gammaedUp] | |
def rounder(topValue, gammas): | |
return [min(topValue, round(x*topValue)) for x in gammas] |
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
# -*- coding: utf-8 -*- | |
""" | |
* This file is part of FreeKiteSim. | |
* | |
* FreeKiteSim -- A kite-power system power simulation software. | |
* Copyright (C) 2013 by Uwe Fechner, Delft University | |
* of Technology, The Netherlands. All rights reserved. | |
* | |
* FreeKiteSim is free software; you can redistribute it and/or | |
* modify it under the terms of the GNU Lesser General Public |
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
# circle.py | |
# by Dave Pape, for DMS 423 | |
# | |
# draws a circle, where the points for the vertex list are computed at run-time | |
from math import * | |
from pyglet.gl import * | |
window = pyglet.window.Window() |