POV-Ray : Newsgroups : povray.general : grouping transforms into one final rotation? : Re: grouping transforms into one final rotation? Server Time
2 May 2024 23:00:52 EDT (-0400)
  Re: grouping transforms into one final rotation?  
From: Bald Eagle
Date: 19 Sep 2018 20:35:02
Message: <web.5ba2ea5a81dcebf3458c7afe0@news.povray.org>
Alain <kua### [at] videotronca> wrote:

vstr()

> Similar to str.
> The first paremeter is the numbet of elements to parse.
> The third is a string to be used as a separator.
>
> I think that it's clearer and cleaner.

It is, though I find it cumbersome and hard to remember the exact syntax.

I've just started using:

#macro Vector (_Value, _P, _N)
 #local _Result = concat ("<", vstr(3, _Value, ", ", 0, _P), ">");
 #if(_N) #local _Result = concat (_Result, " \n") #end
 _Result
#end

with the last argument a Boolean to select without or with an ending "\n".

If need be it can be edited or copied to another macro "Vector4", etc.

Another link to add to Kenneth's Autumn reading list:

http://www.c-jump.com/bcc/common/Talk3/Math/Matrices/Matrices.html#W01_0150_matrix_by_matrix_mult


Post a reply to this message

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