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

Class Ring

source code

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

2D ring pattern generator.

See the Disk class for a note about the Gaussian fall-off.



Nested Classes [hide private]

Inherited from base.parameterizedobject.ParameterizedObject: __metaclass__

Instance Methods [hide private]
 
function(self, params)
Function to draw a pattern that will then be scaled and rotated.
source code

Inherited from base.patterngenerator.PatternGenerator: __call__

Inherited from base.parameterizedobject.ParameterizedObject: __getstate__, __init__, __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]
  thickness = <topo.base.parameterclasses.Number object at 0x9da...
Thickness (line width) of the ring.
  smoothing = <topo.base.parameterclasses.Number object at 0x9da...
Width of the Gaussian fall-off inside and outside the ring.
  aspect_ratio = <topo.base.parameterclasses.Number object at 0x...
Ratio of width to height; size*aspect_ratio gives the overall width.
  size = Number(default= 0.5)
Determines the overall size of the pattern.

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

Inherited from base.parameterizedobject.ParameterizedObject: name, print_level

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

function(self, params)

source code 

Function to draw a pattern that will then be scaled and rotated.

Instead of implementing __call__ directly, PatternGenerator subclasses will typically implement this helper function used by __call__, because that way they can let __call__ handle the scaling and rotation for them. Alternatively, __call__ itself can be reimplemented entirely by a subclass (e.g. if it does not need to do any scaling or rotation), in which case this function will be ignored.

Overrides: base.patterngenerator.PatternGenerator.function
(inherited documentation)

Class Variable Details [hide private]

thickness

Thickness (line width) of the ring.
Value:
Number(default= 0.015, bounds= (0.0, None), softbounds= (0.0, 0.5), precedence= 0.\
60, doc= "Thickness (line width) of the ring.")

smoothing

Width of the Gaussian fall-off inside and outside the ring.
Value:
Number(default= 0.1, bounds= (0.0, None), softbounds= (0.0, 0.5), precedence= 0.61\
, doc= "Width of the Gaussian fall-off inside and outside the ring.")

aspect_ratio

Ratio of width to height; size*aspect_ratio gives the overall width.
Value:
Number(default= 1.0, bounds= (0.0, None), softbounds= (0.0, 2.0), precedence= 0.31\
, doc= "Ratio of width to height; size*aspect_ratio gives the overall width.")