cellsium.geometry package

Various geometry handling functions.

cellsium.geometry.add_empty_third_dimension(array: ndarray) ndarray

Adds an empty third dimension.

Parameters:

array – 2D Array

Returns:

3D Array

cellsium.geometry.circle_segment(radius: float, start: ndarray, stop: ndarray, interval: float = 0.1, minimum_times: int = 10, times: Optional[int] = None) ndarray

Rasters a circle segment from start to stop with a radius radius.

Parameters:
  • radius – Radius

  • start – Start point

  • stop – Stop point

  • interval – Interval

  • minimum_times – Minimal count of points to put between start and stop

  • times – Alternatively: count of points to place

Returns:

Coordinates

cellsium.geometry.line(start: ndarray, stop: ndarray, interval: float = 0.1, minimum_times: int = 10, times: Optional[int] = None) ndarray

Rasters a line from start to stop with points at interval interval.

Parameters:
  • start – Start point

  • stop – Stop point

  • interval – Interval

  • minimum_times – Minimal count of points to put between start and stop

  • times – Alternatively: count of points to place

Returns:

Coordinates

cellsium.geometry.parabolic_deformation(array: ndarray, factor: float) ndarray

Deform array by a parabola.

Parameters:
  • array – Coordinates

  • factor – Factor

Returns:

Deformed coordinates

cellsium.geometry.rotate(data: ndarray, angle: float) ndarray

Rotates data by angle.

Parameters:
  • data – Coordinates

  • angle – Angle

Returns:

Rotated coordinates

cellsium.geometry.rotate3d(data: ndarray, angle: float, axis_vector: ndarray) ndarray

Rotates data within 3D space around axis_vector.

Parameters:
  • data – Coordinates

  • angle – Angle

  • axis_vector – Axis vector of the rotation

Returns:

Rotated points

cellsium.geometry.rotate_and_mesh(points: ndarray, steps: int = 16, clean: bool = True, close_ends: bool = True) Tuple[ndarray, ndarray]

Produces a solid of revolution.

Parameters:
  • points – Coordinates

  • steps – Steps of the revolution

  • clean – Whether to clean the data beforehand

  • close_ends – Whether to close the ends

Returns:

Tuple(Array of Points, Triangle Indices)

cellsium.geometry.shift(data: ndarray, vector: ndarray) ndarray

Shifts coordinates.

Parameters:
  • data – Coordinates

  • vector – Shift vector

Returns:

Shifted coordinates