fractaldna.structure_models.random_placements.Prism

class fractaldna.structure_models.random_placements.Prism(center, size, axis, rotation=0)

Bases: object

__init__(center, size, axis, rotation=0)

Prism(center, size, axis, rotation=0)

Make a prism object x-axis is translated to point along the axis vector. rotation is the rotation of the shape around the x-axis

Methods

__init__(center, size, axis[, rotation])

Prism(center, size, axis, rotation=0)

contains_point(point)

Returns True if point is in prism

does_overlap(other)

Evaluate if the two prisms overlap using a separating axis test This is reasonably easy with prisms, as we only need to compare to the axes of each wall, using all the corners.

get_point()

Return a point inside the prism

to_plot([n, ax, arrows])

plot in 3d using n points

to_series()

Return the prism as a pandas series object.

to_text()

Describe prism according to the following text specification: POS_X POS_Y POS_Z EUL_PSI EUL_THETA EUL_PHI

contains_point(point)

Returns True if point is in prism

does_overlap(other)

Evaluate if the two prisms overlap using a separating axis test This is reasonably easy with prisms, as we only need to compare to the axes of each wall, using all the corners.

get_point()

Return a point inside the prism

to_plot(n=200, ax=None, arrows=False)

plot in 3d using n points

to_series()

Return the prism as a pandas series object.

Return type:

Series

to_text()

Describe prism according to the following text specification: POS_X POS_Y POS_Z EUL_PSI EUL_THETA EUL_PHI

Return type:

str