Ask Your Question
0

viewpoint on animation

asked 2025-03-17 00:02:47 +0200

micron gravatar image

updated 2025-03-17 11:24:17 +0200

eric_g gravatar image

Hi, I worked so hard to get this animation to work properly and I am stoked because I finally got everything together and animating but I can't see how to set the camera position or viewpoint that I want. Ideally it could be a parametrized continuous loop around but I want to first be able set even one constant viewpoint. I have captured the viewpoint that I want as ((0.215,0.3686,0.9044),124.36). I currently have an animate object called c and I can say c.show(delay=10, iterations=2) but show() doesn't recognize viewpoint as an option so how do I set it?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2025-03-17 11:21:48 +0200

eric_g gravatar image

updated 2025-03-18 14:11:08 +0200

Instead of show, use interactive:

c.interactive(delay=10, iterations=2, viewpoint=((0.215, 0.3686, 0.9044), 124.36))

If you don't want to get the playback slider and buttons at the top of the view, you can add the option animation_controls=False:

c.interactive(delay=10, iterations=2, viewpoint=((0.215, 0.3686, 0.9044), 124.36),
              animation_controls=False)

The full list of options is here.

edit flag offensive delete link more

Comments

@eric_g : the question of the choice of a viewpoint remains interesting for the generation of an independent video animation (e. g.for inclusion in an HTML page).

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2025-03-17 13:15:22 +0200 )edit

Once you get the animated image via c.interactive(...), click on the circled i button at the bottom right and select "Save as HTML". Does this achieve what you have in mind?

eric_g gravatar imageeric_g ( 2025-03-17 15:36:54 +0200 )edit

Thank you @eric_g! I just wish it was more clear in the docs that this is an option. even the page you link doesn't show an example with this workflow so it's not clear how people would know to do this. Thanks again!!

micron gravatar imagemicron ( 2025-03-18 17:15:09 +0200 )edit

Ok, I have some followup concerns. 1. the iterations value seems to be meaningless in interactive mode. I can say loop=False and it will play one single iteration or if I don't put that, it seems to just play incessantly. 2. just curious now if you or anyone could point me toward more info on making the viewpoint parametric or otherwise continuously changing over the course of the animation. Thank you for your time.

micron gravatar imagemicron ( 2025-03-18 17:26:52 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2025-03-17 00:02:47 +0200

Seen: 118 times

Last updated: Mar 18