.. 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 :ref:`Go to the end ` 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-14 .. code-block:: Python # Authors: Julien Lefevre # License: MIT # sphinx_gallery_thumbnail_number = 2 .. GENERATED FROM PYTHON SOURCE LINES 15-19 NOTE: there is no visualization tool in slam, but we provide at the end of this script exemplare code to do the visualization with an external solution ############################################################################## .. GENERATED FROM PYTHON SOURCE LINES 21-22 importation of slam modules .. GENERATED FROM PYTHON SOURCE LINES 22-25 .. code-block:: Python import slam.curvature as scurv import slam.generate_parametric_surfaces as sgps .. GENERATED FROM PYTHON SOURCE LINES 26-27 Creating an examplar 3-4-...n hinge mesh .. GENERATED FROM PYTHON SOURCE LINES 27-31 .. code-block:: Python 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) .. rst-class:: sphx-glr-script-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 .. GENERATED FROM PYTHON SOURCE LINES 32-42 VISUALIZATION USING EXTERNAL TOOLS ############################################################################# # Visualization with visbrain visb_sc = splt.visbrain_plot( mesh=hinge_mesh, tex=mean_curvature, caption="hinge", cblabel="mean curvature" ) visb_sc.preview() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 3.564 seconds) .. _sphx_glr_download_auto_examples_example_hinge_gyri.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: example_hinge_gyri.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: example_hinge_gyri.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: example_hinge_gyri.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_