File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -243,13 +243,28 @@ def _convert_data_to_geometry(
243243 )
244244 X , Y = np .meshgrid (x , y )
245245
246+ # Interpolate data points into a grid
247+ data_x = data .vert_positions [:, 0 ]
248+ data_y = data .vert_positions [:, 1 ]
246249 res = interpolate .Rbf (
247- data . vert_positions [:, 0 ] ,
248- data . vert_positions [:, 1 ] ,
250+ data_x ,
251+ data_y ,
249252 data .vert_positions [:, 2 ],
250253 function = interpolation_config .method ,
251254 )(X , Y )
252255
256+ # Interpolate data points for animation into a grid
257+ data .z_ns = np .array (
258+ [
259+ interpolate .Rbf (
260+ data_x ,
261+ data_y ,
262+ z ,
263+ function = interpolation_config .method ,
264+ )(X , Y ).reshape (- 1 )
265+ for z in data .z_ns .T
266+ ]
267+ ).T
253268 for row in range (interpolation_config .m ):
254269 for col in range (interpolation_config .n ):
255270 verts .append (
You can’t perform that action at this time.
0 commit comments