floripy.models.miura_sheet package#

Submodules#

floripy.models.miura_sheet.analyze_traj module#

floripy.models.miura_sheet.analyze_traj.get_phi_theta(v)[source]#

v: (3,) ndarray Returns phi and theta in degrees. phi: Angle measured from the y-axis of the projection on the xy-plane

-pi<=phi<=pi

theta: Angle measured from the z-axis, -pi/2<=theta<=pi/2

floripy.models.miura_sheet.analyze_traj.basic_data(fn_traj, fn_model, fn_data)[source]#

floripy.models.miura_sheet.miura_sheet module#

class floripy.models.miura_sheet.miura_sheet.MiuraSheet(nverts_z, nverts_x, verts, faces, joint_edges)[source]#

Bases: object

Methods

align(axes)

Changes orienation. axes : (3,3) ndarray, dtype float Orthonormal set of unit vectors. The rows represent the x, y, and z-basis vectors respectively in the world frame.

create(a, b, alpha, beta[, eq_angle, H, tiling])

Creates a MiuraSheet instance with the c.o.m.

from_df_mbs(df_mbs, modelspec)

Creates a MiuraSheet instance from df_mbs and modelspec.

from_df_traj(df_traj, modelspec)

set_orientation(ori)

ori: (4,) ndarray representing a unit quaternion

set_com

to_mbs

to_obj

to_pov_mesh2

write_mesh

classmethod create(a, b, alpha, beta, eq_angle=0.0, H=0.0, tiling=(1, 1))[source]#

Creates a MiuraSheet instance with the c.o.m. at the origin. Tiling: (#vert, #hor), i.e. (depth, width)

classmethod from_df_mbs(df_mbs, modelspec)[source]#

Creates a MiuraSheet instance from df_mbs and modelspec. The c.o.m. position and orientation is as calculated from df_mbs.

Parameters:
df_mbsdict

keywords: ‘body_coms’, ‘body_orientations’

modelspecdict
Returns:
msAn instance of MiuraSheet
classmethod from_df_traj(df_traj, modelspec)[source]#
Parameters:
df_trajdict

keywords: ‘vertices’, ‘com’

modelspecdict
Returns:
msAn instance of MiuraSheet
to_mbs(fn_yaml)[source]#
set_com(loc)[source]#
align(axes)[source]#

Changes orienation. axes : (3,3) ndarray, dtype float

Orthonormal set of unit vectors. The rows represent the x, y, and z-basis vectors respectively in the world frame.

set_orientation(ori)[source]#

ori: (4,) ndarray representing a unit quaternion

write_mesh(fn_xmf)[source]#
to_obj(fn_obj)[source]#
to_pov_mesh2(fn_pov)[source]#
floripy.models.miura_sheet.miura_sheet.ndarray_to_str(A, order='C', elements_per_line=3)[source]#

floripy.models.miura_sheet.miura_sheet_trajectory module#

class floripy.models.miura_sheet.miura_sheet_trajectory.MiuraSheetTrajectory(fn_traj, fn_model)[source]#

Bases: object

Methods

close

create

get_frame

close()[source]#
get_frame(i)[source]#
classmethod create(fn_traj, fn_model)[source]#
floripy.models.miura_sheet.miura_sheet_trajectory.create_xdmf(fn_h5, fn_xmf)[source]#

Create an xdmf file from HDF5 trajectory file.

Module contents#