Package springbots :: Module gear
[hide private]

Module gear

source code

This module contains the core part of the sprinbots, which is their nodes and springs. Here are implemented all the physics behaviour and interations among those parts.

Classes [hide private]
A node is a mass circle which acts gravity, air resistance.
Spring: An object that connect nodes, and can only exist if connecting two diferent nodes.
Variables [hide private]
  ANGLE_STEP = 0.025
The rate which the angle changes, this parameter affects the frequency of motion of springs
  GRAVITY = (0, 0.3)
Acceleration vector aplied every step of simulation on nodes
% of node's velocity lost every step of simulation
Parameter which determines the force of springs
  VISCOSITY = 0.05
Causes buoyancy force on springs motion
  NODE_WEIGHT = 1.26
This parameter is not used on physics
  RADIUS = 8
Node's radius
  MAX_NORMAL = 400.0
Maximum spring's normal
  UP = 1
Direction constant: UP
  DOWN = 2
Direction constant: DOWN
  LEFT = 3
Direction constant: LEFT
  RIGHT = 4
Direction constant: RIGHT