Kitware / ipyparaview

iPython widget for server-side ParaView rendering in Jupyter.
Apache License 2.0
9 stars 1 forks source link

More camera models #2

Open banesullivan opened 4 years ago

banesullivan commented 4 years ago

Only one camera model is currently implemented in the widget (turntable). We should implement other camera models like trackball.

Reference https://github.com/Kitware/resonanthpc/issues/2#issuecomment-616847132

banesullivan commented 4 years ago

@NickLeaf, is there any documentation you used when making the current camera model? There's quite a bit of non-trivial math happening in there, and it would be nice to have a bit of context before jumping into this if possible

NickLeaf commented 4 years ago

That's all hand-coded, I'm afraid. I translated some old C++ code I had, then added some bits to allow setting a different pole vector used for spherical coordinates. The math for turntable and trackball will be different enough that I don't think there will be a ton of shared code, except for maybe panning.

I like the approach that you're taking of separating the camera model code into it's own file and modularizing it. Multiple camera models was something I knew it would need eventually, and this feels like a good way to go about it.