POV-Ray : Newsgroups : povray.general : Object Handling for Water-Surface-System : Object Handling for Water-Surface-System Server Time
5 Nov 2024 13:27:14 EST (-0500)
  Object Handling for Water-Surface-System  
From: Tim Nikias v2 0
Date: 27 Mar 2003 03:43:33
Message: <3e82b9b5@news.povray.org>
In order to implement object-water interaction into my
frame-independant system, I'll have to come up with a
way to calculate the position of an object at any given
moment. This is to ensure that in any given step of
the water-algorithm, the objects are in the appropriate
place, and not just at the spot where the frame would
dictate them to be.

To achieve this, I've come up with following method:
You declare you're object along with a similiar named
transformation-macro:
#declare This_Object=...
#macro This_Object_Transformation(X)
 transform{ [Stuff based on X] }
#end

Then, the User creates an array filled with strings, which
are the identifiers for the objects:
#declare Object_List=array[2] {"This_Object","That_Object"}

The macro will then parse the string along with the
transformation-macro, and thus I can create the position
and orientation of the object and any moment I please,
thus making it possible to calculate several steps in a
single frame. Internally, the object would then move
properly across the surface, even though on-screen it
stays put for one frame...

Additionally, this method provides the User with an easy
way to place his objects into the scenery in a precise way
which should line up with the animation of the water and
leaves almost no room for mistakes on the User's side:
object{This_Object This_Object_Transformation(clock)}

The only spot for problems is feeding the appropriate clock-
variable. The water-system is based upon the variable
"water_clock", which should run from 0 to 1. Thus, the object-
interaction will be calculated during that timespan, but I assume
that this should be obvious.

Does anyone have a better idea which meets the requirements:
-frame-independant transformation
-easy and intuitive use

Regards,
Tim

--
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: Tim### [at] gmxde


Post a reply to this message

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