.. _examples_page:

Examples
=========

The following contains examples of MicroStructPy.
These examples include an introduction to the XML input files,
some more advanced input files used on the CLI,
and scripts that use the Python package.

.. _intro_examples:

Input File Introduction
-----------------------

.. toctree::
    :maxdepth: 1
    :numbered:

    intro/intro_1
    intro/intro_2
    intro/intro_3
    intro/intro_4
    intro/intro_5
    intro/intro_6

.. only:: html

  .. image:: ../../../src/microstructpy/examples/intro_1_basic/trimesh.png
    :alt: Triangular mesh from first intro example.
    :width: 32%
    :target: intro/intro_1.html


  .. image:: ../../../src/microstructpy/examples/intro_2_quality/trimesh.png
    :alt: Triangular mesh from second intro example.
    :width: 32%
    :target: intro/intro_2.html


  .. image:: ../../../src/microstructpy/examples/intro_3_size_shape/trimesh.png
    :alt: Triangular mesh from third intro example.
    :width: 32%
    :target: intro/intro_3.html


  .. image:: ../../../src/microstructpy/examples/intro_4_oriented/trimesh.png
    :alt: Triangular mesh from fourth intro example.
    :width: 32%
    :target: intro/intro_4.html


  .. image:: ../../../src/microstructpy/examples/intro_5_plotting/trimesh.png
    :alt: Triangular mesh from fifth intro example.
    :width: 32%
    :target: intro/intro_5.html


  .. image:: ../../../src/microstructpy/examples/intro_6_culmination/trimesh.png
    :alt: Triangular mesh from sixth intro example.
    :width: 32%
    :target: intro/intro_6.html


.. _cli_examples:

CLI Examples
------------

.. toctree::
    :maxdepth: 1

    cli/elliptical_grains
    cli/minimal
    cli/basalt
    cli/two_phase_3d
    cli/colormap

.. only:: html

  .. image:: ../../../src/microstructpy/examples/elliptical_grains/trimesh.png
    :alt: Triangular mesh with elliptical grains.
    :width: 64%
    :target: cli/elliptical_grains.html

  .. image:: ../../../src/microstructpy/examples/minimal/polymesh.png
    :alt: Polygonal mesh from minimal example.
    :width: 32%
    :target: cli/minimal.html

  .. image:: ../../../src/microstructpy/examples/basalt_circle/trimesh.png
    :alt: Triangular mesh from basalt example.
    :width: 32%
    :target: cli/basalt.html

  .. image:: ../../../src/microstructpy/examples/two_phase_3D/polymesh.png
    :alt: Polygonal mesh from 3D two phase example.
    :width: 32%
    :target: cli/two_phase_3d.html

  .. image:: ../../../src/microstructpy/examples/colormap/trimesh.png
      :alt: Triangular mesh from 3D colormap example.
      :width: 32%
      :target: cli/colormap.html



.. _package_examples:

Python Package Examples
-----------------------

.. toctree::
    :maxdepth: 1

    package/standard_voronoi
    package/uniform_seeding
    package/foam
    package/logo
    package/grain_neighborhoods
    package/from_image
    package/mesh_process

.. only:: html

  .. image:: ../../../src/microstructpy/examples/standard_voronoi/voronoi_diagram.png
    :alt: Standard Voronoi diagram.
    :height: 210px
    :target: package/standard_voronoi.html

  .. image:: ../../../src/microstructpy/examples/uniform_seeding/voronoi_diagram.png
    :alt: Voronoi diagram with uniformly-spaced seeds, colored by area.
    :height: 210px
    :target: package/uniform_seeding.html

  .. image:: ../../../src/microstructpy/examples/foam/trimesh.png
    :alt: Mesh of foam microstructure.
    :height: 210px
    :target: package/foam.html

  .. image:: ../../../src/microstructpy/examples/logo/logo.png
    :alt: MicroStructPy logo.
    :height: 210px
    :target: package/logo.html

  .. image:: ../../../src/microstructpy/examples/grain_neighborhoods/trimesh.png
    :alt: Triangular mesh of microstructure with seed neighborhoods.
    :height: 210px
    :target: package/grain_neighborhoods.html

  .. image:: ../../../src/microstructpy/examples/from_image/trimesh.png
    :alt: Triangular mesh of aluminum microstructure.
    :height: 210px
    :target: package/from_image.html

  .. image:: ../../../src/microstructpy/examples/docs_banner/banner.png
    :alt: Microstructure meshing process..
    :target: package/mesh_process.html
