Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vispy viewer] investigate if we can record a video of the rotating image #318

Open
sanjayankur31 opened this issue Mar 13, 2024 · 2 comments
Labels
good first issue A good issue for newcomers to work on Help wanted T: enhancement Type: enhancement

Comments

@sanjayankur31
Copy link
Member

We can manually rotate the cell at the moment, but it isn't ideal---it rotates about its original position. But, what will be great is if a key would allow the user to record a video of whatever is being shown in the viewer. They can then pan and zoom etc. to easily create a visualisation of their network.

It should be already doable:

vispy/vispy#1979

Can also be done using moviepy, but it's currently struggling with lack of maintainers, so let's maybe not use it just yet.

http://zulko.github.io/blog/2014/11/29/data-animations-with-python-and-moviepy/

See: https://github.com/Zulko/moviepy

@sanjayankur31 sanjayankur31 added T: enhancement Type: enhancement Help wanted good first issue A good issue for newcomers to work on labels Mar 13, 2024
@AdityaBITMESRA
Copy link
Contributor

Hello sir @sanjayankur31. I would like to work on this issue. I will update you after I go through all the instructions mentioned thoroughly.

@AdityaBITMESRA
Copy link
Contributor

Hi sir @sanjayankur31
to solve this issue i am thinking of writing a code where

  • I am importing the imageio library, which will be used for video recording functionality.

  • I am setting up a scene canvas with various customization options, including cameras,
    coordinate axes, and video recording functionality.

  • I will create_new_vispy_canvas function that takes arguments to customize the view range,
    title, coordinate axes, and color theme.

  • I am creating and configuring multiple camera objects (PanZoomCamera, TurntableCamera,
    ArcballCamera, and FlyCamera) for different viewing perspectives.

  • I am adding event handlers for key presses to control video recording using the
    imageio library.

  • I am defining functions for updating the visualisation, toggling video recording,
    and rotating the view.

  • I will create a function plot_interactive_3D to create an interactive 3D visualisation.

Is this approach good to start with? Would be grateful for your guidance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue A good issue for newcomers to work on Help wanted T: enhancement Type: enhancement
Projects
Status: 🏗 In progress
2 participants