smaller error but still not same
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import plotly.graph_objects as go
|
||||
from plotly.subplots import make_subplots
|
||||
|
||||
|
||||
def plot_mesh(verts, faces):
|
||||
@@ -25,4 +26,43 @@ def plot_mesh(verts, faces):
|
||||
|
||||
fig.update_layout(margin=dict(l=0, r=0, b=0, t=0, pad=0))
|
||||
|
||||
return fig
|
||||
|
||||
|
||||
def plot_mesh_2(verts_1, verts_2, faces):
|
||||
# fig = make_subplots(rows=1, cols=2, start_cell="top-left", specs = [ [{ 'type': 'scene' } for _ in range(2)] ])
|
||||
fig = go.Figure()
|
||||
|
||||
fig.add_trace(go.Mesh3d(
|
||||
x=verts_1[:,0],
|
||||
y=verts_1[:,2],
|
||||
z=verts_1[:,1],
|
||||
i = faces[:,0],
|
||||
j = faces[:,1],
|
||||
k = faces[:,2],
|
||||
text="",
|
||||
),)
|
||||
|
||||
fig.add_trace(go.Mesh3d(
|
||||
x=verts_2[:,0],
|
||||
y=verts_2[:,2],
|
||||
z=verts_2[:,1],
|
||||
i = faces[:,0],
|
||||
j = faces[:,1],
|
||||
k = faces[:,2],
|
||||
text="",
|
||||
),)
|
||||
|
||||
fig.update_layout(scene_aspectmode='manual', scene_aspectratio=dict(x=1, y=1, z=1),
|
||||
# scene2_aspectmode='manual', scene2_aspectratio=dict(x=1, y=1, z=1)
|
||||
)
|
||||
helper = dict(xaxis = dict(range=[-1,1], ),
|
||||
yaxis = dict(range=[-1,1], ),
|
||||
zaxis = dict(range=[-1,1], ) )
|
||||
fig.update_layout(scene = helper,
|
||||
# scene2 = helper
|
||||
)
|
||||
|
||||
fig.update_layout(margin=dict(l=0, r=0, b=0, t=0, pad=0))
|
||||
|
||||
return fig
|
||||
Reference in New Issue
Block a user