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)[source]

Bases: BlenderObject

A boundary for cells.

remesh(voxel_size: float = 0.7, smooth: bool = True) None[source]

Remesh the boundary mesh.

Parameters:
  • voxel_size (float) – The resolution used for the remesher (smaller means more polygons).

  • smooth (bool) – If true, the final faces will appear smooth.

Return type:

None

setup_physics()[source]

Set up physics for the boundary.

update_volume() float[source]

Update the volume of the boundary.

Return type:

float

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.

disable()[source]

Disables the force.

enable()[source]

Enables the force.

enabled() bool[source]

Checks if the force field is enabled.

Return type:

bool

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 | None

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: str

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)

add(force: Force | ForceCollection)[source]

Add a Force or Force Collection to the collection.

Parameters:

force (Force | ForceCollection)

property forces

List of all forces contained in this collection and subcollections.

static global_forces() ForceCollection[source]

Collection of forces that affects all cells.

Returns:

The collection containing global forces.

Return type:

ForceCollection

hide()[source]

Remove the Force Collection from the scene, making it invisible in Blender.

property name: str

Name of the collection of forces.

remove(force: Force | ForceCollection)[source]

Remove a Force or Force Collection from the collection.

Parameters:

force (Force | ForceCollection)

show()[source]

Add the Force Collection to the scene, making it visible in Blender.

class goo.force.MotionForce(obj: Object)[source]

Bases: Force

A motion force.

Parameters:

obj (Object)

point_towards(loc: Vector)[source]

Set location of a motion force, towards which a cell will move.

Parameters:
  • new_loc – Location of the motion force.

  • target_loc – Location of the cell upon which the motion acts.

  • loc (Vector)

property strength

Strength of the force field.

goo.force.create_adhesion(strength: int, obj: Object | None = None, name: str | None = None, loc: tuple | None = None, shape: str = 'POINT') 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 | None) – Name of the adhesion force.

  • loc (tuple | None) – Initial location of the adhesion force.

  • shape (str) – Shape of the adhesion force.

Return type:

AdhesionForce

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 of the boundary.

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:

MotionForce