import matplotlib.pyplot as plt from mpl_toolkits.mplot3d.art3d import Poly3DCollection def plot_3d_figure(): fig = plt.figure(figsize=(10, 8)) ax = fig.add_subplot(111, projection='3d') # Based on the orthographic views: # Top View (top-left): A square with an inscribed triangle and a center line. # Front View (bottom-left): A single horizontal line. # Right View (bottom-right): A square with a dashed diagonal. # This combination describes a flat square plate that has been folded. # Specifically, it's a square sheet [0,6]x[0,6] in the XY plane that is # folded along the lines from (0,0) to (3,6) and (6,0) to (3,6). # However, for the Front View to be a single line, the entire object must # project to a line on the XZ plane, meaning Z must be 0 for all points. # But the Right View shows height (a square), which is a contradiction # unless the "line" in the front view is actually the base of a vertical # structure that is very thin, or the layout of views is non-standard. # A common interpretation for this specific puzzle is a "folded plate" # or a wireframe model. Let's reconstruct the most likely 3D wireframe/surface: # A square base with a vertical triangular "fin" or a pyramid-like structure # where some views are simplified. # Vertices for a shape that matches the Top and Right views: # Base: (0,0,0), (6,0,0), (6,6,0), (0,6,0) # Peak: (3,6,6) faces = [ # 1. Bottom square base [[0,0,0], [6,0,0], [6,6,0], [0,6,0]], # 2. Left sloped triangular face [[0,0,0], [3,6,6], [0,6,0]], # 3. Right sloped triangular face [[6,0,0], [3,6,6], [6,6,0]], # 4. Front sloped triangular face [[0,0,0], [6,0,0], [3,6,6]], # 5. Back vertical triangular face [[0,6,0], [6,6,0], [3,6,6]] ] # Create the 3D polygon collection poly3d = Poly3DCollection(faces, facecolors='#4C99D1', linewidths=1.5, edgecolors='black', alpha=0.8) ax.add_collection3d(poly3d) # Set axes limits ax.set_xlim([0, 6]) ax.set_ylim([0, 6]) ax.set_zlim([0, 6]) # Set labels ax.set_xlabel('X (Width)') ax.set_ylabel('Y (Depth)') ax.set_zlabel('Z (Height)') # Set viewing angle ax.view_init(elev=30, azim=-60) # Force equal proportions ax.set_box_aspect([1, 1, 1]) plt.title("3D Reconstruction: Folded Plate / Asymmetric Pyramid", fontsize=14, pad=20) plt.tight_layout() plt.show() if __name__ == "__main__": plot_3d_figure()