Showing Mesh Tetrahedron

In mesh tetrahedron i,j, and k parameters can be used to manually specify the geometry of the triangles of the mesh.

Example:

Python3




import plotly.graph_objects as go
import numpy as np
  
# Data for three-dimensional scattered points
z = 15 * np.random.random(100)
x = np.sin(z) + 0.1 * np.random.randn(100)
y = np.cos(z) + 0.1 * np.random.randn(100)
  
fig = go.Figure(data=[go.Mesh3d(x=x, y=y, z=z, color='green',
                                opacity=0.20, alphahull=3,
                                i=[1, 0, 0, 1],
                                j=[1, 2, 3, 4],
                                k=[4, 3, 1, 3],)])
  
fig.show()


Output:



3D Mesh Plots using Plotly in Python

Plotly is a Python library that is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, spreadplot, and many more. It is mainly used in data analysis as well as financial analysis. plotly is an interactive visualization library

Similar Reads

3D Mesh Plots

A Mesh plot is a plot that has three dimensions surface and has solid edges and no face colors. A Mesh plot is a way to create a 3D set of triangles with vertices given by x, y, and z. If there are only coordinates, then algorithm such as Delaunay triangulation is used to form a triangle. I, J, and K parameters can also be used to create a triangle....

Showing Mesh Tetrahedron

...

Contact Us