Code Search for Developers
 
 
  

test.py from gzz at Krugle


Show test.py syntax highlighted

# 
# Copyright (c) 2003, Tuomas J. Lukka and Janne Kujala
# 
# This file is part of Gzz.
# 
# Gzz is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# 
# Gzz is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
# Public License for more details.
# 
# You should have received a copy of the GNU Lesser General
# Public License along with Gzz; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA  02111-1307  USA
# 
# 


# A simple test animation

from __future__ import nested_scopes

from gfx.util.misc import *

q = coloredQuad((1, 0, 0))

def vs(x, y):
    vobs = film.newVS()
    vobs.map.put(background((.5,.5,0)))
    cs = vobs.translateCS(0, "T", x, y)
    cs = vobs.scaleCS(cs, "S", 80, 80)
    vobs.map.put(q, cs)
    return vobs


film.putStill(.05, vs(10,10))
film.animateLinearlyTo(1, vs(100,50))
film.animateLinearlyTo(.5, vs(50,200))
film.animateLinearlyTo(1.5, vs(10,10))





See more files for this project here

gzz

An implementation of Ted Nelson's ZZstructure. ZZstructure is a new type of programming platform for structured data.

Project homepage: http://savannah.nongnu.org/projects/gzz
Programming language(s): C++,Java,Python
License: lgpl21

  fillets.py
  paper.py
  test.py