如何使用Python的tricontourf绘制3D立方体的2D投影?
Cube Vertex Coordinates & Face-Vertex Mapping
Alright, here's the structured data for your cube—including all 8 vertex coordinates across x, y, z axes, plus note that the face-vertex array (where each face is composed of two triangles) is associated with this vertex set:
import numpy as np # X-axis coordinates for all cube vertices x = np.array([ 0.16257299, -0.370805 , -1.09232295, 1.62570095, -1.62570095, 1.09232295, 0.370805 , -0.16257299]) # Y-axis coordinates for all cube vertices y = np.array([-1.71022499, -0.81153202, -0.52910602, -0.36958599, 0.369587 , 0.52910602, 0.81153202, 1.71022499]) # Z-axis coordinates for all cube vertices (truncated input as provided) z = np.array([ 0.22068501, -1.48456001, 1.23566902, 0.469576 , -0.469576 , -1.23566902, 1.4845600...])
Quick note: The z-coordinate array looks truncated in your input. Since a cube has exactly 8 vertices, make sure this array is completed to 8 values to align with x and y. If you need help working with the face-vertex triangle arrays later, feel free to share that data too!
内容的提问来源于stack exchange,提问作者Anthony Lethuillier
相关产品推荐
相关产品推荐

