Package topo :: Package pattern :: Module basic :: Class Arc
[hide private]
[frames] | no frames]

Class Arc

source code


2D arc pattern generator.

Draws an arc (partial ring) of the specified size (radius*2), starting at radian 0.0 and ending at arc_length. The orientation can be changed to choose other start locations. The pattern is centered at the center of the ring.

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

Nested Classes [hide private]

Inherited from param.parameterized.Parameterized: __metaclass__

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

Inherited from base.patterngenerator.PatternGenerator: __call__

Inherited from param.parameterized.Parameterized: __getstate__, __init__, __repr__, __setstate__, __str__, debug, defaults, force_new_dynamic_value, get_param_values, get_value_generator, inspect_value, message, print_param_values, script_repr, set_default, set_dynamic_time_fn, set_param, state_pop, state_push, verbose, warning

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

Class Methods [hide private]

Inherited from param.parameterized.Parameterized: params, print_param_defaults

Class Variables [hide private]
  aspect_ratio = param.Number(default= 1.0, bounds= (0.0, None),...
Ratio of width to height; size*aspect_ratio gives the overall width.
  thickness = param.Number(default= 0.015, bounds= (0.0, None), ...
Thickness (line width) of the ring.
  smoothing = param.Number(default= 0.05, bounds= (0.0, None), s...
Width of the Gaussian fall-off inside and outside the ring.
  arc_length = param.Number(default= pi, bounds= (0.0, None), so...
Length of the arc, in radians, starting from orientation 0.0.
  size = param.Number(default= 0.5)
Determines the overall size of the pattern.
  name = <param.parameterized.String object at 0xb1ff3ec>
String identifier for this object.

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

Inherited from param.parameterized.Parameterized: print_level

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

function(self, p)

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]

aspect_ratio

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

thickness

Thickness (line width) of the ring.
Value:
param.Number(default= 0.015, bounds= (0.0, None), softbounds= (0.0, 0.5), preceden\
ce= 0.60, doc= "Thickness (line width) of the ring.")

smoothing

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

arc_length

Length of the arc, in radians, starting from orientation 0.0.
Value:
param.Number(default= pi, bounds= (0.0, None), softbounds= (0.0, 2.0* pi), inclusi\
ve_bounds= (True, False), precedence= 0.62, doc= """
        Length of the arc, in radians, starting from orientation 0.0.""")