widgetti / ipyvolume

3d plotting for Python in the Jupyter notebook based on IPython widgets using WebGL
MIT License
1.95k stars 236 forks source link

HIgher order interpolation scheme #214

Open cphyc opened 5 years ago

cphyc commented 5 years ago

First of all, thank you for this amazing project!

I am using it to visualize the gas falling onto galaxies. Unfortunately, their trajectories are really far from being straight lines so here is my question. When doing animation of 3D scatter plots, the interpolation between two successive frames is currently using a linear interpolation. Would it be feasible to implement higher order interpolation scheme (e.g. cubic interpolation or even splines)?

maartenbreddels commented 5 years ago

First of all, thank you for this amazing project!

Thanks!

Would it be feasible to implement higher order interpolation scheme (e.g. cubic interpolation or even splines)?

Not as it currently is, basically the animation is a 'side effect' of the animation, which is based on previous and current values.

You can always do it manually (in Python) and push the data to the frontend, it will be slower (as in, non-interactive). In all the animations I do I make sure the time resolution is such that the linear interpolation looks good enough.

Hope that helps.

PS: Not saying it cannot be done, but it requires a serious investment.