.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/example_hinge_gyri.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_example_hinge_gyri.py: .. _example_curvature: =================================== example of hinge shaped surface =================================== .. GENERATED FROM PYTHON SOURCE LINES 8-15 .. code-block:: default # Authors: Julien Lefevre # License: BSD (3-clause) # sphinx_gallery_thumbnail_number = 2 .. GENERATED FROM PYTHON SOURCE LINES 16-17 importation of slam modules .. GENERATED FROM PYTHON SOURCE LINES 17-22 .. code-block:: default import slam.plot as splt import slam.curvature as scurv import slam.generate_parametric_surfaces as sgps .. GENERATED FROM PYTHON SOURCE LINES 23-24 Creating an examplar 3-4-...n hinge mesh .. GENERATED FROM PYTHON SOURCE LINES 24-34 .. code-block:: default hinge_mesh = sgps.generate_hinge(n_hinge=4) mesh_curvatures = scurv.curvatures_and_derivatives(hinge_mesh) mean_curvature = 1 / 2 * mesh_curvatures[0].sum(axis=0) visb_sc = splt.visbrain_plot( mesh=hinge_mesh, tex=mean_curvature, caption="hinge", cblabel="mean curvature" ) visb_sc.preview() .. image:: /auto_examples/images/sphx_glr_example_hinge_gyri_001.png :alt: example hinge gyri :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none Calculating vertex normals .... Please wait Finished calculating vertex normals Calculating curvature tensors ... Please wait Finished Calculating curvature tensors Calculating Principal Components ... Please wait Finished Calculating principal components .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 4.049 seconds) .. _sphx_glr_download_auto_examples_example_hinge_gyri.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: example_hinge_gyri.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: example_hinge_gyri.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_