|
![](/i/fill.gif) |
In article <398C643F.8A35D43D@sk.sympatico.ca>, Bruce L
<dke### [at] sk sympatico ca> wrote:
> Would it be possible to (mis)use the color_map structure? Instead of a
> color component, they would contain a rotation, scale or translation
> vector. I've been looking at something similar for my parameterized
> people includes, but it gets pretty sloppy pretty fast when you need to
> start concatenating several transformations.
It would be possible, but would require a completely different(and more
memory consuming, and slower) way of storing the transformation, and
would be more limiting.(you would be limited to a certain sequence of
transforms, you could only change their parameters)
It would also be difficult to use.
> On the other hand, having a transformation_map{} structure may provide
> beneficial for just this type of thing, and perhaps the existing
> interpolation code/routines used for color_map/etc could be used as a
> starting point.
Some kind of list to interpolate between transforms would be nice, but I
don't have any idea how to do it...just do an interpolation between the
matrix values? Cubic interpolation, or just linear?
What I am thinking of is a way to store the expression, so you can
replace a value(like clock) and reparse it when you need the
transformations at a specific point in time. This might be too slow, and
I haven't figured out how to save a chunk of code to repeatedly parse
later. The closest I can come is something like motion blur, where a
chunk of code is repeatedly parsed as soon as it is encountered.(I used
this method for custom_particle before I got too frusterated with it's
limitations and replaced it with get_particle functions) Of course, I
could just do this and store the transforms...but when you have 100's of
iterations, the amount of memory devoted to storing matrices gets
unacceptable.(16 doubles per matrix, two matrices per transform, one
transform per iteration...)
It might end up being the only/best way, but I would rather use a more
memory-efficient method.
--
Christopher James Huff - Personal e-mail: chr### [at] mac com
TAG(Technical Assistance Group) e-mail: chr### [at] tag povray org
Personal Web page: http://homepage.mac.com/chrishuff/
TAG Web page: http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |