goo.force¶
- class goo.force.AdhesionForce(obj)[source]¶
Bases:
Force
An adhesion force.
- property strength: int¶
Strength of the force field.
- class goo.force.Boundary(obj: Object)[source]¶
Bases:
BlenderObject
A boundary for cells.
- Parameters:
obj (Object)
- class goo.force.Force(obj: Object, type='FORCE')[source]¶
Bases:
BlenderObject
A force.
Forces are represented in Blender by force field objects. They interact with cells to influence their motion.
- Parameters:
obj (Object) – Blender object to be used as a representation for the force.
- Variables:
type (str) – Type of force.
- property falloff: float¶
Falloff power of the force. Strength at distance \(r\) is given by \(\text{strength} / r ^ \text{falloff}\).
- property impulse_clamp: int¶
Impulse clamp of the force field.
- property max_dist: float¶
Maximum distance an object can be from a force to be affected.
- property min_dist: float¶
Minimum distance an object must be from a force to be affected.
- property shape: int¶
Shape of the force field.
- property strength: int¶
Strength of the force field.
- class goo.force.ForceCollection(name: str)[source]¶
Bases:
object
A class representing a collection of forces.
A force collection is represented by Blender collections of Blender forces.
- Parameters:
name (str)
- property collection: Collection¶
The underlying Blender collection.
- property forces¶
List of forces in this collection.
- static global_forces() ForceCollection [source]¶
Collection of forces that affects all cells.
- Returns:
The collection containing global forces.
- Return type:
- property name: str¶
Name of the collection of forces.
- class goo.force.MotionForce(obj: Object)[source]¶
Bases:
Force
A motion force.
- Parameters:
obj (Object)
- set_loc(new_loc: Vector, target_loc: Vector)[source]¶
Set location of a motion force, towards which a cell will move.
- Parameters:
new_loc (Vector) – Location of the motion force.
target_loc (Vector) – Location of the cell upon which the motion acts.
- property strength¶
Strength of the force field.
- goo.force.create_adhesion(strength: int, obj: Object | None = None, name: str = None, loc: tuple = (0, 0, 0), shape: str = 'SURFACE') AdhesionForce [source]¶
Creates a new adhesion force.
Adhesion forces can either be created from cells, in which they are homotypic forces, Or they can be created de novo, in which they are heterotypic adhesion forces meant to allow two different cell types to interact with each other.
- Parameters:
strength (int) – Strength of the adhesion force.
obj (Object | None) – Cell to use as origin of the adhesion force. If None, a new object is created.
name (str) – Name of the adhesion force.
loc (tuple) – Initial location of the adhesion force.
shape (str) – Shape of the adhesion force.
- Return type:
- goo.force.create_boundary(loc: tuple, size: float, mesh: str = 'icosphere')[source]¶
Create a boundary.
- Parameters:
loc (tuple) – Center of the boundary.
size (float) – Radius of the boundary.
mesh (str) – Shape fo the boundary.
- goo.force.create_force(name: str, loc: tuple, strength: int, type: str = 'FORCE', falloff: float = 0, min_dist: float = None, max_dist: float = None, shape: str = 'POINTS') Force [source]¶
Creates a new force field.
- Parameters:
name (str) – The name of the force field object.
loc (tuple) – The location of the force field object.
strength (int) – The strength of the force field.
type (str) – The type of the force field.
falloff (float) – The falloff power of the force field.
min_dist (float) – The minimum distance for the force field.
max_dist (float) – The maximum distance for the force field.
shape (str) – The shape of the force field. Defaults to “SURFACE”.
- Returns:
The created force field object.
- Return type:
- goo.force.create_motion(name: str, loc: tuple, strength: int) MotionForce [source]¶
Creates a new motion force.
- Parameters:
name (str) – Name of the motion force.
loc (tuple) – Initial location of the motion force.
strength (int) – Strength of the motion force.
- Return type: