:orphan: .. _examples: Examples ======== Each example is a standalone script: download it at the bottom of its page and run it with ``python .py``. Most of them are run at each documentation build and the 3D scenes can be rotated in the *Interactive Scene* tab. Examples that need the optional CAD backend say so (``pip install microgen[cad]``). .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. thumbnail-parent-div-close .. raw:: html
.. _examples_basic_shapes: Basic shapes ------------ Elementary shapes (box, sphere, cylinder, capsule, ellipsoid, extruded polygon, polyhedra) used as building blocks of microstructures. .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /examples/BasicShapes/images/thumb/sphx_glr_platonic_solids_thumb.png :alt: :doc:`/examples/BasicShapes/platonic_solids` .. raw:: html
Platonic solids
.. raw:: html
.. only:: html .. image:: /examples/BasicShapes/images/thumb/sphx_glr_shapes_thumb.png :alt: :doc:`/examples/BasicShapes/shapes` .. raw:: html
Basic shapes
.. thumbnail-parent-div-close .. raw:: html
.. toctree:: :hidden: /examples/BasicShapes/platonic_solids /examples/BasicShapes/shapes .. _examples_tpms: Triply periodic minimal surfaces (TPMS) --------------------------------------- Sheet and skeletal TPMS, density and cell-size grading, morphing between TPMS families, cylindrical, spherical and swept coordinate frames, and infill of arbitrary meshes. .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /examples/TPMS/images/thumb/sphx_glr_coordinate_frames_thumb.png :alt: :doc:`/examples/TPMS/coordinate_frames` .. raw:: html
Spherical, cylindrical and swept frames
.. raw:: html
.. only:: html .. image:: /examples/TPMS/images/thumb/sphx_glr_cylindrical_thumb.png :alt: :doc:`/examples/TPMS/cylindrical` .. raw:: html
Cylindrical gyroid
.. raw:: html
.. only:: html .. image:: /examples/TPMS/images/thumb/sphx_glr_cylindrical_graded_thumb.png :alt: :doc:`/examples/TPMS/cylindrical_graded` .. raw:: html
Radially graded cylindrical gyroid
.. raw:: html
.. only:: html .. image:: /examples/TPMS/images/thumb/sphx_glr_cylindrical_rotated_thumb.png :alt: :doc:`/examples/TPMS/cylindrical_rotated` .. raw:: html
Rotated cylindrical gyroid
.. raw:: html
.. only:: html .. image:: /examples/TPMS/images/thumb/sphx_glr_fischer_koch_s_thumb.png :alt: :doc:`/examples/TPMS/fischer_koch_s` .. raw:: html
Fischer-Koch S surface
.. raw:: html
.. only:: html .. image:: /examples/TPMS/images/thumb/sphx_glr_graded_cell_size_thumb.png :alt: :doc:`/examples/TPMS/graded_cell_size` .. raw:: html
Cell size grading
.. raw:: html
.. only:: html .. image:: /examples/TPMS/images/thumb/sphx_glr_graded_cell_type_thumb.png :alt: :doc:`/examples/TPMS/graded_cell_type` .. raw:: html
Morphing between TPMS types
.. raw:: html
.. only:: html .. image:: /examples/TPMS/images/thumb/sphx_glr_graded_density_thumb.png :alt: :doc:`/examples/TPMS/graded_density` .. raw:: html
Density grading
.. raw:: html
.. only:: html .. image:: /examples/TPMS/images/thumb/sphx_glr_gyroid_thumb.png :alt: :doc:`/examples/TPMS/gyroid` .. raw:: html
Gyroid
.. raw:: html
.. only:: html .. image:: /examples/TPMS/images/thumb/sphx_glr_infill_bunny_thumb.png :alt: :doc:`/examples/TPMS/infill_bunny` .. raw:: html
Gyroid infill of a mesh
.. raw:: html
.. only:: html .. image:: /examples/TPMS/images/thumb/sphx_glr_infill_graded_distance_thumb.png :alt: :doc:`/examples/TPMS/infill_graded_distance` .. raw:: html
Infill graded by the distance to the surface
.. raw:: html
.. only:: html .. image:: /examples/TPMS/images/thumb/sphx_glr_infill_gyroid_thumb.png :alt: :doc:`/examples/TPMS/infill_gyroid` .. raw:: html
Gyroid infilled by a gyroid
.. raw:: html
.. only:: html .. image:: /examples/TPMS/images/thumb/sphx_glr_spherical_thumb.png :alt: :doc:`/examples/TPMS/spherical` .. raw:: html
Spherical gyroid shell
.. raw:: html
.. only:: html .. image:: /examples/TPMS/images/thumb/sphx_glr_tpms_shell_thumb.png :alt: :doc:`/examples/TPMS/tpms_shell` .. raw:: html
Gyroid in a shell
.. raw:: html
.. only:: html .. image:: /examples/TPMS/images/thumb/sphx_glr_tpms_sphere_thumb.png :alt: :doc:`/examples/TPMS/tpms_sphere` .. raw:: html
Spherical gyroid
.. raw:: html
.. only:: html .. image:: /examples/TPMS/images/thumb/sphx_glr_tpms_surfaces_thumb.png :alt: :doc:`/examples/TPMS/tpms_surfaces` .. raw:: html
Available TPMS
.. thumbnail-parent-div-close .. raw:: html
.. toctree:: :hidden: /examples/TPMS/coordinate_frames /examples/TPMS/cylindrical /examples/TPMS/cylindrical_graded /examples/TPMS/cylindrical_rotated /examples/TPMS/fischer_koch_s /examples/TPMS/graded_cell_size /examples/TPMS/graded_cell_type /examples/TPMS/graded_density /examples/TPMS/gyroid /examples/TPMS/infill_bunny /examples/TPMS/infill_graded_distance /examples/TPMS/infill_gyroid /examples/TPMS/spherical /examples/TPMS/tpms_shell /examples/TPMS/tpms_sphere /examples/TPMS/tpms_surfaces .. _examples_spinodoids: Spinodoids ---------- Stochastic, bicontinuous and exactly periodic microstructures generated from Gaussian random fields. .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /examples/Spinodoids/images/thumb/sphx_glr_spinodoid_thumb.png :alt: :doc:`/examples/Spinodoids/spinodoid` .. raw:: html
Spinodoid
.. thumbnail-parent-div-close .. raw:: html
.. toctree:: :hidden: /examples/Spinodoids/spinodoid .. _examples_lattices: Lattices -------- Preset and custom strut-based lattices, octet-truss with a periodic mesh, and honeycomb. .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /examples/Lattices/images/thumb/sphx_glr_custom_auxetic_lattice_thumb.png :alt: :doc:`/examples/Lattices/custom_auxetic_lattice` .. raw:: html
Custom auxetic lattice
.. raw:: html
.. only:: html .. image:: /examples/Lattices/images/thumb/sphx_glr_honeycomb_thumb.png :alt: :doc:`/examples/Lattices/honeycomb` .. raw:: html
Honeycomb
.. raw:: html
.. only:: html .. image:: /examples/Lattices/images/thumb/sphx_glr_octet_truss_thumb.png :alt: :doc:`/examples/Lattices/octet_truss` .. raw:: html
Periodic octet-truss mesh
.. raw:: html
.. only:: html .. image:: /examples/Lattices/images/thumb/sphx_glr_preset_lattices_thumb.png :alt: :doc:`/examples/Lattices/preset_lattices` .. raw:: html
Preset strut lattices
.. thumbnail-parent-div-close .. raw:: html
.. toctree:: :hidden: /examples/Lattices/custom_auxetic_lattice /examples/Lattices/honeycomb /examples/Lattices/octet_truss /examples/Lattices/preset_lattices .. _examples_implicit: Implicit workflow ----------------- Phases defined by their implicit field, meshed by marching cubes without the optional CAD backend. .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /examples/ImplicitShapes/images/thumb/sphx_glr_gyroid_implicit_phase_thumb.png :alt: :doc:`/examples/ImplicitShapes/gyroid_implicit_phase` .. raw:: html
Gyroid as an implicit Phase
.. raw:: html
.. only:: html .. image:: /examples/ImplicitShapes/images/thumb/sphx_glr_implicit_booleans_thumb.png :alt: :doc:`/examples/ImplicitShapes/implicit_booleans` .. raw:: html
Boolean operations on implicit fields
.. thumbnail-parent-div-close .. raw:: html
.. toctree:: :hidden: /examples/ImplicitShapes/gyroid_implicit_phase /examples/ImplicitShapes/implicit_booleans .. _examples_rve: Particle and fibre RVEs ----------------------- Periodic representative volume elements filled with random, non-overlapping inclusions, built as unions of implicit shapes. .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /examples/RVE/images/thumb/sphx_glr_fibres_rve_thumb.png :alt: :doc:`/examples/RVE/fibres_rve` .. raw:: html
Periodic RVE of short fibres
.. raw:: html
.. only:: html .. image:: /examples/RVE/images/thumb/sphx_glr_spheres_rve_thumb.png :alt: :doc:`/examples/RVE/spheres_rve` .. raw:: html
Periodic RVE of spheres
.. thumbnail-parent-div-close .. raw:: html
.. toctree:: :hidden: /examples/RVE/fibres_rve /examples/RVE/spheres_rve .. _examples_3d_operations: 3D operations ------------- Repetition of a unit cell, rasterization of a phase, Voronoi tessellations and their intersection with a TPMS. .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /examples/3Doperations/images/thumb/sphx_glr_raster_ellipsoid_thumb.png :alt: :doc:`/examples/3Doperations/raster_ellipsoid` .. raw:: html
Rasterized ellipsoid
.. raw:: html
.. only:: html .. image:: /examples/3Doperations/images/thumb/sphx_glr_repeat_shape_thumb.png :alt: :doc:`/examples/3Doperations/repeat_shape` .. raw:: html
Repeat a unit cell
.. raw:: html
.. only:: html .. image:: /examples/3Doperations/images/thumb/sphx_glr_voronoi_thumb.png :alt: :doc:`/examples/3Doperations/voronoi` .. raw:: html
Voronoi polycrystal
.. raw:: html
.. only:: html .. image:: /examples/3Doperations/images/thumb/sphx_glr_voronoi_gyroid_thumb.png :alt: :doc:`/examples/3Doperations/voronoi_gyroid` .. raw:: html
Voronoi gyroid
.. thumbnail-parent-div-close .. raw:: html
.. toctree:: :hidden: /examples/3Doperations/raster_ellipsoid /examples/3Doperations/repeat_shape /examples/3Doperations/voronoi /examples/3Doperations/voronoi_gyroid .. _examples_mesh: Meshing and remeshing --------------------- Periodic tetrahedral meshes with gmsh and remeshing with mmg. These examples need the ``mmg`` executables (``conda install -c conda-forge mmg``); they are not run at each documentation build. .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /examples/Mesh/images/thumb/sphx_glr_mmg3d_thumb.png :alt: :doc:`/examples/Mesh/mmg3d` .. raw:: html
Level-set remeshing with mmg
.. raw:: html
.. only:: html .. image:: /examples/Mesh/images/thumb/sphx_glr_mmg_voronoi_thumb.png :alt: :doc:`/examples/Mesh/mmg_voronoi` .. raw:: html
Level-set remeshing of a Voronoi mesh
.. raw:: html
.. only:: html .. image:: /examples/Mesh/images/thumb/sphx_glr_periodic_gyroid_remesh_thumb.png :alt: :doc:`/examples/Mesh/periodic_gyroid_remesh` .. raw:: html
Periodic gyroid mesh from a STEP file
.. raw:: html
.. only:: html .. image:: /examples/Mesh/images/thumb/sphx_glr_remesh_thumb.png :alt: :doc:`/examples/Mesh/remesh` .. raw:: html
Periodic remeshing
.. thumbnail-parent-div-close .. raw:: html
.. toctree:: :hidden: /examples/Mesh/mmg3d /examples/Mesh/mmg_voronoi /examples/Mesh/periodic_gyroid_remesh /examples/Mesh/remesh .. _examples_fibres: Fibres ------ Short fibre composites rebuilt from a list of measured fibres. .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /examples/Fibers/images/thumb/sphx_glr_fibers_thumb.png :alt: :doc:`/examples/Fibers/fibers` .. raw:: html
Short fibre composite
.. thumbnail-parent-div-close .. raw:: html
.. toctree:: :hidden: /examples/Fibers/fibers .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_