.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "11_demos\itom\pointClouds\demo_mesh.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_11_demos_itom_pointClouds_demo_mesh.py: Mesh ======= .. GENERATED FROM PYTHON SOURCE LINES 5-26 .. code-block:: Python import numpy as np from itom import pointCloud from itom import algorithms from itom import dataObject from itom import polygonMesh [X, Y] = np.meshgrid(range(0, 2), range(0, 2)) Z = np.array([[0, 0], [1, 1]]) cloud = pointCloud.fromXYZ( dataObject(X.astype("float32")), dataObject(Y.astype("float32")), dataObject(Z.astype("float32")), ) indices = np.array([[0, 1, 3, 2]]) mesh = polygonMesh.fromCloudAndPolygons(cloud, indices) meshOut = polygonMesh() algorithms.pclMeshTriangulation(mesh, meshOut) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.001 seconds) .. _sphx_glr_download_11_demos_itom_pointClouds_demo_mesh.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: demo_mesh.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: demo_mesh.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: demo_mesh.zip `