|
![](/i/fill.gif) |
In article <3a68ccf1@news.povray.org>, "Rune" <run### [at] iname com>
wrote:
> But I don't really know how the <X,Y,Z> syntax would work.
It would take the XYZ coordinates of a point and output new XYZ
coordinates...you could even have built-in "vector" functions like
vrotate and vaxis_rotate, though they would only return a component at a
time. (vrotate_x(px, py, pz, rx, ry, rz), vaxis_rotate_y(), etc...
> What I would prefer is to deform a mesh just like I would deform a point.
> Like this:
>
> Translate by <1,2,3>: P+<1,2,3>
> Scale by <1,2,3>: P*<1,2,3>
> Rotate 55 degrees about A axis: vaxis_rotate(P,A,55)
>
> To make more complicated deforms I can take advantage of #local or
> #declare:
>
> #declare A = P*<1,2,1>;
> #declare B = P+<2,1,1>;
> vrotate(A,90*x*B.x)
>
> I find that it couldn't be more simple and intuitive than this. Could a
> deform function be made to work the same way?
Not without a substantial amount of work...basically replicating the
functionality of isosurface functions for vectors and writing code to
parse stuff that looks like POV-Script on the fly. If this was easy or
even just a bit difficult, don't you think it would have been done
already for isosurface functions?
> > Using macros would be too slow...
>
> The macro was not the important part.
Well, it should be possible to make a version of functions that handles
only vectors, but it seems like an unnecessary inconsistency with the
float version, and you likely wouldn't be able to use the two together.
And if you really want to use a macro, you could always read the data
from the mesh, do what you want with it using a macro, and create a new
mesh with it. (Using the mesh data stuff Warp wrote.)
Maybe you could provide a sample of the syntax you would use?
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
![](/i/fill.gif) |