yejunliang23 commited on
Commit
9bf92fd
·
verified ·
1 Parent(s): b8a5db7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -13
app.py CHANGED
@@ -285,27 +285,23 @@ def reset_state(task_history):
285
  return []
286
 
287
  def make_pointcloud_figure(verts,rotate=False):
288
- if rotate:
289
- verts = verts.copy()
290
- verts[:, 0] *= -1.0
291
- marker_size = 6
292
- scatter = go.Scatter3d(
293
- x=verts[:,0], y=verts[:,1], z=verts[:,2],
294
- mode='markers',
295
- marker=dict(size=marker_size, color='blue', opacity=0.8),
296
  )
297
-
298
- fig = go.Figure(scatter)
299
- # 让 Plotly 自动缩放到数据范围
300
  fig.update_layout(
301
- width=600, height=400,
302
  scene=dict(
303
  xaxis=dict(visible=False),
304
  yaxis=dict(visible=False),
305
  zaxis=dict(visible=False),
306
  aspectmode='auto'
307
  ),
308
- margin=dict(l=0,r=0,b=0,t=0)
 
309
  )
310
  return fig
311
 
 
285
  return []
286
 
287
  def make_pointcloud_figure(verts,rotate=False):
288
+ verts = np.random.rand(1000,3) - 0.5
289
+ fig = go.Figure(
290
+ go.Scatter3d(
291
+ x=verts[:,0], y=verts[:,1], z=verts[:,2],
292
+ mode='markers',
293
+ marker=dict(size=6, color='blue', opacity=0.8)
294
+ )
 
295
  )
 
 
 
296
  fig.update_layout(
 
297
  scene=dict(
298
  xaxis=dict(visible=False),
299
  yaxis=dict(visible=False),
300
  zaxis=dict(visible=False),
301
  aspectmode='auto'
302
  ),
303
+ margin=dict(l=0,r=0,b=0,t=0),
304
+ width=600, height=400
305
  )
306
  return fig
307