cylindrical_pillars_mesh¶
- cylindrical_pillars_mesh(shape: list, f: float = 0.75, a: int = 1000, n: int = None, truncate: bool = True)[source]¶
A 2D micromodel with randomly located cylindrical pillars of random radius
The model is generated by inserting disks at each corner of a triangular mesh (generated using nanomesh). The size of the disks is a fraction of the maximally inscribed disk at each location.
Parameter¶
- shapearray_like
The X, Y size of the desired image in pixels
- fscalar
A factor to control the relative size of the pillars. f = 1 results in pillars that just touch each other, while f < 1 will add more space between the pillars
- ascalar
Controls the number of pillars in the image, with a small value giving more pillars. The default is 1500. Technically this parameter sets the minimum area for each triangle in the mesh.
- nscalar
Controls the distance between pillars on the edges. By default it uses $sqrt{a}/f$, but it can be overwritten using this argument if needed.
- truncatebool
A flag to indicate if the output should be truncated to the given shape or if the returned image should be expanded to include the full boundary pillars. The default is True.
- returns:
im – A ndarray with pillars locations determined by generating a triangular mesh of the specified domain size and putting pillars at each vertex. Note that this process is deterministic for a given set of input arguments so the apparent randomness of the pillar locations is actually determined by the underlaying mesh package used (nanomesh).
- rtype:
ndarray
Examples
Click here to view online example.