|
|
Doodling a bit before work, and I need to find the position of a point after
rotating around an axis.
So I need to include transforms.inc to have use of vtransform, but then that
suddenly triggered a parse error of a macro I was using that exports its values
via a (N1, N2) tuple-style assignment.
I tried redeclaring the version after the inc file invocation, but (since this
happens upon exiting the inc file already) that didn't fix anything.
So this looks like a bug in source.
Perhaps someone can confirm and investigate.
(Also, many of these silly macros ought to be inbuilt functions in future
versions)
- BW
Post a reply to this message
|
|
|
|
On 12/26/23 15:43, Bald Eagle wrote:
> But then I commented out transforms.inc and everything worked fine, so then I
> copied the vtransform macro and pasted into the scene and ...
>
> now the tuple-style assignment feature seems to be permanently broken. 🙁
>
> So there seems to be some persistent thing somewhere that gets triggered
> haphazardly - which are always the most fun bugs to track down and fix.
This is probably a case of the tuple related error messages not being
that clear when the tuple / list / batch assignment types get mixed. I
mentioned this somewhere else - maybe only a direct email to you, though?
I'm guessing you have written something like this:
#version 3.8;
#include "transforms.inc"
#declare Xfrm = transform {translate -z}
#declare (Vx,Vy) = vtransform(x, Xfrm);
...
If so, that last tuple assignment from the result of the vtransform
macro (which returns a vector) needs to be something like:
#declare <Vx,Vy> = vtransform(x, Xfrm);
or
#declare <Vx,Vy,Vz> = vtransform(x, Xfrm); // all vector components
---
Aside:
Where still shipped in the core includes, the yuqk fork renamed all
lower case macro names (and include compiled functions) with leading
upper case characters to make clear what is a true inbuilt functionality
and what is not. Official releases of POV-Ray have too many include
coded things which 'look' like keywords that are not. So, yuqk's
vtransform() is called VTransform(). This renaming also a step toward
adding additional, true, inbuilt functions.
Further, the recommended vector transform macro in yuqk is called
VectorTransform() which comes from Tor Olav Kristensen's vectors.inc
which ships as a yuqk core include file.
Bill P.
Post a reply to this message
|
|