|
 |
Warp wrote in message <470b5016@news.povray.org>:
> There's no more skill involved than in the current POV-Ray when you apply
> a series of transformations to an object.
> There's no need for a stack. There's no need to revert transformations.
> You simply apply a series of transformations to the object at each frame
> (basically what you do with the current SDL, but without having to reparse
> the object).
>
> I really can't understand what is the problem people are seeing here.
> Could someone please explain to me this?
I am not sure that this is exactly the problem that everyone else has in
mind, but I can see an example. Consider that you are writing an articulated
model using CSG (maybe a robot or something). Consider the elbow: there is
an articulation, meaning a variable rotation.
To make it easily, you proceed that way:
- you move the forearm part to put the elbow at the origin;
- you apply the free rotation;
- you move the forearm to put the elbow at the end of the upper arm.
And later, you move the whole arm as a whole.
If you want to change the free rotation of the elbow, you need to change the
second of the three transformations applied to the forearm.
With the current SDL, the way to do that is to pre-define all the values for
free rotations, and then build the whole object.
With a new SDL, I hope it would be possible to write something like that:
#declare Giskard = Robot(...);
Giskard.forearm.rotate(30*x);
The naive way to write this object is something like that:
#declare Arm = union {
[... upper arm ...]
object {
Forearm
translate <to move it to the origin>
rotate <free rotation>
translate <to the elbow>
}
}
If things are done that way, it is necessary to be able to change the
rotation between the two translations.
On the other hand, things can be written:
#declare Arm = union {
[... upper arm ...]
object {
object { /* forearm at origin here */
Forearm
translate <to move it to the origin>
}
translate <to the elbow>
}
}
In that case, it is enough to be able to apply a new transform to the object
marked by the comment. But maybe this is less efficient.
Post a reply to this message
|
 |