Package springbots :: Module gear :: Class Node
[hide private]

Class Node

source code


A node is a mass circle which acts gravity, air resistance. It has a position and a velocity and can be connected by springs

Instance Methods [hide private]
 
__init__(self, pos=(0, 0), vel=(0, 0), acc=(0, 0))
Creates a node with a start position, velocity and acceleration
source code
 
refresh(self, atr=0.01, grav=(0, 0.3), elast=0.6)
Refreshes node: changes position based on velocity and velocity based on acceleration.
source code
 
colideWall(self, limit, side, atr_normal=0.6, atr_surface=0.5, min_vel=0.99, radius=8)
Colides this node with a wall, if possible.
source code
 
colide(self, other, radius=8)
Colides this node with another one, if possible
source code
 
__repr__(self)
repr(x)
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, pos=(0, 0), vel=(0, 0), acc=(0, 0))
(Constructor)

source code 

Creates a node with a start position, velocity and acceleration

Overrides: object.__init__

refresh(self, atr=0.01, grav=(0, 0.3), elast=0.6)

source code 

Refreshes node: changes position based on velocity and velocity based on acceleration. Also applies gravity and air resistance

colideWall(self, limit, side, atr_normal=0.6, atr_surface=0.5, min_vel=0.99, radius=8)

source code 

Colides this node with a wall, if possible. Applies surface friction and changes velocity

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)