MEDYAN.make_memb_sphere!

Tuple{MEDYAN.Context}

make_memb_sphere!(c::Context; radius, center=SA[0.0,0.0,0.0], subdivisions=2)::MembId

Create a new spherical membrane in the simulation context and return its membrane identifier.

This function generates an icosphere mesh by subdividing the faces of a regular icosahedron. Each subdivision step splits every triangle into four smaller triangles, resulting in a more refined, nearly uniform triangulation of the sphere. The mesh is then scaled by radius, rotated by rotation, and translated to center.

Keyword Arguments

  • radius::Float64: Radius of the sphere (nm)
  • center::SVector{3,Float64}=SA[0.0,0.0,0.0]: Center of the sphere (nm)
  • subdivisions::Int=3: Number of subdivisions (1 = icosahedron, each increment quadruples the number of triangles)
  • rotation=I: 3x3 matrix to rotate the sphere around its center
  • mech_params::MembraneMechParams = MembraneMechParams(): Mechanical parameters for membrane mechanics
  • area0::Union{Float64, Nothing} = nothing: Reference area (if nothing, computed from initial mesh) (nm^2)
  • volume0::Union{Float64, Nothing} = nothing: Reference volume (if nothing, computed from initial mesh) (nm^3)
  • offset_volume::Float64=0.0: Actual volume is cone volume with the origin plus the offset (nm^3)
  • type::Int=1: Membrane type index
  • chem_boundary::Bool = false: If true, the membrane acts as a boundary for 3D diffusing species.
  • chem_boundary_exterior::Bool = false: If true, the confined chemical domain is the exterior; otherwise the confined domain is the interior.

References

  • Mesh construction method: https://web.archive.org/web/20200210070737/http://blog.andreaskahler.com/2009/06/creating-icosphere-mesh-in-code.html