William F Pokorny <ano### [at] anonymousorg> wrote:
> OK, I think I've gotten your vectors.inc merged into - and alongside -
> the core includes of my povr branch. With vectors.inc becoming one of
> the core include files.
> Ended up... Sometimes wrapping macros in transforms.inc and math.inc to
> call your versions. Sometimes leaving the existing, roughly-equivalent
> macros but recommending your version in comments - and using yours over
> the old versions otherwise in the core include files.
I'm a bit worried about the wrapping solution. That is because I'm contemplating
a minor change in either the OrthogonalVector() macro or the
If one pass the same vector to both of these, I want the resulting vectors to
always be orthogonal to each other in addition to being orthogonal to the
vector passed to the macros.
Right now it is mostly so. But if if all the components in the passed vector are
equal, this will not be the case (except for the case were the passed vector is
the zero vector).
To fix this I would prefer to change the order of the "ifs" in the
If the old VPerp_To_Vector() macro is changed to call (wrap) the new
OrthogonalVector() with reordered "ifs", it will break scenes using the
So now I'm not sure what to do...
> As anticipated some minor changes in declared IDs due povr's lower case
> Added basic self testing of all the macros as a block appended to the
> Turned out well. Thank you!
Thank you too !
I tried to look for your new core include files at your github pages, but I
could not find them there. Are they visible somewhere else ?
> Only suggestion I'll make has to do with the documentation on your
> github page at: ttps://github.com/t-o-k/Useful-POV-Ray-macros.
> With the VectorsFromTransform() and VectorsFromTransformFunction(),
> where you are showing the initialization of v_X, v_Y, v_Z and p_T, ahead
> of the macro calls; you could use the, new to v3.8, tuple initialization
> syntax. For example:
> #declare (v_X,v_Y,v_Z,p_T) = (<0,0,0>,<0,0,0>,<0,0,0>,<0,0,0>);
I had forgotten about this new initialization type. I've now changed the
examples to use it.
I've also changed the parameter names of the AccurateAngleBetweenVectors()
macro, so that are in line with the names in the other macros.
Post a reply to this message