POV-Ray : Newsgroups : povray.general : Math error : Re: Math error Server Time
29 Jul 2024 20:24:01 EDT (-0400)
  Re: Math error  
From: Anthony D  Baye
Date: 23 Sep 2010 00:10:01
Message: <web.4c9ad1be50cc844d507e8a090@news.povray.org>
"Anthony D. Baye" <Sha### [at] spamnomorehotmailcom> wrote:
> =?UTF-8?B?IkrDqXLDtG1lIE0uIEJlcmdlciI=?= <jeberger@free.fr> wrote:
> > Anthony D. Baye wrote:
> > >      #local Seconds = T.x*3600 + T.y*60 * T.z;
> >
> >  Shouldn't that be a "+" before "T.z"?
> >
> >   Jerome
> > --
> > mailto:jeb### [at] freefr
> > http://jeberger.free.fr
> > Jabber: jeb### [at] jabberfr
>
> It's correct in the files.  Just a typo in the post.
>
> A.D.B.

It seems that the problem lay in the fact that the operations aren't precomputed
by the separate macros but, rather, dropped in to form a larger equation. The
result is that I had to parenthesize EVERYTHING in each macro, so that the
proper order of operations could be preserved.

It makes sense when I think about it.

the troublemaker line was in the eClock macro

_TICK_*Seconds

i changed it to (_TICK_*Seconds) and voila!
I also put encapsulating parentheses around each of the three formulae in Timer.

The Timer macro is now self-limiting and additive so that the line:

rotate (Timer(1, <0, 0, 0>, <0, 0, 5>, 1080) +
        Timer (3, <0, 0, 5>, <0, 0, 10>, 1080))*x

creates a timeline for rotation about the x axis where the first five seconds
are spent accelerating to 4 revs/sec and the last five are spent rotating at a
constant 4 revs/sec.

Comments?

A.D.B.


Post a reply to this message

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