Package topo :: Package patterns :: Module basic :: Class Translator
[hide private]
[frames] | no frames]

Class Translator

source code

                                  object --+        
                                           |        
base.parameterizedobject.ParameterizedObject --+    
                                               |    
          base.patterngenerator.PatternGenerator --+
                                                   |
                                                  Translator

PatternGenerator that moves another PatternGenerator over time.

To create a pattern at a new location, asks the underlying PatternGenerator to create a new pattern at a location translated by an amount based on the global time.



Nested Classes [hide private]

Inherited from base.parameterizedobject.ParameterizedObject: __metaclass__

Instance Methods [hide private]
 
__init__(self, **params)
Initialize this ParameterizedObject.
source code
 
__call__(self, **params)
Construct new pattern out of the underlying one.
source code

Inherited from base.patterngenerator.PatternGenerator: function

Inherited from base.parameterizedobject.ParameterizedObject: __getstate__, __repr__, __setstate__, __str__, as_uninitialized, debug, defaults, force_new_dynamic_value, get_param_values, get_value_generator, inspect_value, message, print_param_values, script_repr, verbose, warning

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__

Class Methods [hide private]

Inherited from base.parameterizedobject.ParameterizedObject: params, print_param_defaults

Class Variables [hide private]
  generator = <topo.base.parameterclasses.ClassSelectorParameter...
Pattern to be translated.
  direction = <topo.base.parameterclasses.Number object at 0x9db...
The direction in which the pattern should move, in radians.
  speed = Number(default= 1, bounds= (0.0, None), doc= ...
The speed with which the pattern should move, in sheet coordinates per simulation time unit.
  reset_period = <topo.base.parameterclasses.Number object at 0x...
When pattern position should be reset, usually to the value of a dynamic parameter.
  last_time = 0.0
float(x) -> floating point number

Inherited from base.patterngenerator.PatternGenerator: bounds, mask, offset, orientation, output_fn, position, scale, size, x, xdensity, y, ydensity

Inherited from base.parameterizedobject.ParameterizedObject: name, print_level

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, **params)
(Constructor)

source code 

Initialize this ParameterizedObject.

The values of parameters can be supplied as keyword arguments to the constructor (using parametername=parametervalue); these values will override the class default values for this one instance.

If no 'name' parameter is supplied, self.name defaults to the object's class name with a unique number appended to it.

Overrides: base.parameterizedobject.ParameterizedObject.__init__
(inherited documentation)

__call__(self, **params)
(Call operator)

source code 
Construct new pattern out of the underlying one.
Overrides: base.patterngenerator.PatternGenerator.__call__

Class Variable Details [hide private]

generator

Pattern to be translated.
Value:
ClassSelectorParameter(default= Constant(scale= 0.0), class_= PatternGenerator, do\
c= """Pattern to be translated.""")

direction

The direction in which the pattern should move, in radians.
Value:
Number(default= 0, bounds= (-pi, pi), doc= """
        The direction in which the pattern should move, in radians.""")

speed

The speed with which the pattern should move, in sheet coordinates per simulation time unit.
Value:
Number(default= 1, bounds= (0.0, None), doc= """
        The speed with which the pattern should move,
        in sheet coordinates per simulation time unit.""")

reset_period

When pattern position should be reset, usually to the value of a dynamic parameter.

The pattern is reset whenever fmod(simulation_time,reset_time)==0.

Value:
Number(default= 1, bounds= (0.0, None), doc= """
        When pattern position should be reset, usually to the value of a dynamic p\
arameter.

        The pattern is reset whenever fmod(simulation_time,reset_time)==0.""")

last_time

float(x) -> floating point number

Convert a string or number to a floating point number, if possible.

Value:
0.0