fabiencasenave commited on
Commit
29f12ba
·
verified ·
1 Parent(s): 5a36bea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -48,7 +48,7 @@ def sample_info(sample_id_str, fieldn):
48
 
49
 
50
  quads = plaid_sample.get_elements()['QUAD_4']
51
- print("quads.shape =", quads.shape)
52
 
53
  # generate colormap
54
  if np.linalg.norm(field) > 0:
@@ -70,7 +70,7 @@ def sample_info(sample_id_str, fieldn):
70
 
71
  # compose scene
72
  scene = pyrender.Scene(ambient_light=[.1, .1, .3], bg_color=[0, 0, 0])
73
- camera = pyrender.PerspectiveCamera( yfov=np.pi / 6.0)
74
  light = pyrender.DirectionalLight(color=[1,1,1], intensity=1000.)
75
 
76
  scene.add(mesh, pose= np.eye(4))
@@ -78,7 +78,7 @@ def sample_info(sample_id_str, fieldn):
78
 
79
  scene.add(camera, pose=[[ 1, 0, 0, 1],
80
  [ 0, 1, 0, 0],
81
- [ 0, 0, 1, 10],
82
  [ 0, 0, 0, 1]])
83
 
84
  # render scene
 
48
 
49
 
50
  quads = plaid_sample.get_elements()['QUAD_4']
51
+ quads = quads[:,[3,2,1,0]]
52
 
53
  # generate colormap
54
  if np.linalg.norm(field) > 0:
 
70
 
71
  # compose scene
72
  scene = pyrender.Scene(ambient_light=[.1, .1, .3], bg_color=[0, 0, 0])
73
+ camera = pyrender.PerspectiveCamera( yfov=np.pi / 3.0)
74
  light = pyrender.DirectionalLight(color=[1,1,1], intensity=1000.)
75
 
76
  scene.add(mesh, pose= np.eye(4))
 
78
 
79
  scene.add(camera, pose=[[ 1, 0, 0, 1],
80
  [ 0, 1, 0, 0],
81
+ [ 0, 0, 1, 6],
82
  [ 0, 0, 0, 1]])
83
 
84
  # render scene