Algorithm-Shape-RandomTree
view release on metacpan or search on metacpan
lib/Algorithm/Shape/RandomTree.pm view on Meta::CPAN
# branches sprouting from a node
has 'branch_curve' => ( is => 'ro', isa => 'Num' ); # Average curvature of (non-stem)
# branches
# Nodulation: determins the number of levels of sub-branching
has 'nodulation' => ( is => 'ro', isa => 'Int' );
# Ebbing Factor: Determins how quickly the nodulation decreases along the tree
has 'ebbing_factor' => ( is => 'ro', isa => 'Int', default => 2 );
# Creation algorithm: can be either linear or recursive
# Linear gives more control but looks slightly less natural
has 'creation_algorithm' => ( is => 'ro', isa => 'Str', default => 'recursive' );
has 'branches' => (
is => 'ro',
isa => 'ArrayRef',
traits => [ 'Array' ],
default => sub { [ ] },
handles => {
add_branch => 'push',
count_branches => 'count',
( run in 0.333 second using v1.01-cache-2.11-cpan-64827b87656 )