|
|
Greg M. Johnson wrote:
>mercatorbase contains the macro
>...
I just had a quick look at your macro.
And below are some comments for you.
1.
Good idea.
2.
I can't understand why you use these
kind of expressions:
pow(_AnyExpression_, 1)
Is there any reason why you cannot just
write _AnyExpression_ ?
Is it to avoid some kind of bug ?
Please explain.
3.
I think that it is wise to change all
those #declare expressions within the
macro to #local expressions.
4.
Note that the p0 variable is not used
inside your macro.
5.
Have you considered shortening your
code, e.g. by replacing this part:
#declare v0 = y;
#local tr1 = transform{rotate z*_ValueB_ rotate y*_ValueA_};
#declare vul = vtransform(v0, tr1);
by something along these lines:
#declare v0 = z; // or -z
#declare vul = vrotate(v0, <_ValueC_, _ValueD_, 0>);
?
Tor Olav
Post a reply to this message
|
|
|
|
Most design problems are due to my coding inefficiency.
However:
"Tor Olav Kristensen" <tor### [at] hotmailcom> wrote in message
news:web.3de2cd0940c56e9238149fba0@news.povray.org...
> 2.
> I can't understand why you use these
> kind of expressions:
>
> pow(_AnyExpression_, 1)
>
> Is there any reason why you cannot just
> write _AnyExpression_ ?
>
> Is it to avoid some kind of bug ?
> Please explain.
>
Yes, the bug that was introduced to the final release of 3.5.
I had forgotten that I'd left that code there.
My first draft had the macro proceed stepwise from say 0 to 360 or 0 to 180,
(for theta or phi). Then I tried an artistic effect where I would have the
top of something be more spherical and less faceted and the bottom be more
faceted: hence a nonlinear stepwise increase in the angle. And to do so, I
was forced to use pow(_AnyExpression_, 2) . In going back to a linear
system, I just replaced the 2 with a 1 but forgot to delete the pow.
I would certainly not be offended it you rewrote this utility to be more
elegant and efficient.
Thanks for the consideration..............
Post a reply to this message
|
|