POV-Ray : Newsgroups : povray.bugreports : tuple-style assignment fails after including transforms.inc : Re: tuple-style assignment fails after including transforms.inc Server Time
11 May 2024 11:27:12 EDT (-0400)
  Re: tuple-style assignment fails after including transforms.inc  
From: William F Pokorny
Date: 26 Dec 2023 16:57:52
Message: <658b4c60$1@news.povray.org>
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

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