POV-Ray : Newsgroups : povray.animations : Storing object rotation : Re: Storing object rotation Server Time
8 Jul 2024 13:01:24 EDT (-0400)
  Re: Storing object rotation  
From: Phil Brewer
Date: 18 Mar 2003 06:35:03
Message: <web.3e77038df05952453b9678810@news.povray.org>
>  Write the necessary values to a file (see the documentation about
>#fopen and #write) and read them in the next frame (#read).
>

I am currently writing my translation values to an external file. The
problem is finding the necessary rotational values to write.

To give more info:

At every frame in the scene, the ball's calculation, velocity, and position
are calculated. Based on these values, I can determine the direction the
ball is moving, and what vector the ball needs rotated about to be rolling.
This rotate_about vector changes every frame to a new value.

The way I see it, I can either save a new rotate statement for every frame
including all previous frames (I think parse times would get excessive
towards the end), or break my arbitrary axis rotation into something that
could be stored as a simple sequence of rotations. This sequence would be
modified every frame, but would never escalate in size like my other
"option". Any ideas on how to do this? Perhaps matrix rotation?

I have had luck with rotating vectors as if they were the ball, because you
can store just the new vector, you don't have to store all of the rotations
that got you the new vector.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.