POV-Ray : Newsgroups : povray.general : Check this out!!! : Re: Check this out!!! Server Time
12 Aug 2024 17:11:39 EDT (-0400)
  Re: Check this out!!!  
From: Ronald L  Parker
Date: 23 Feb 1999 23:05:33
Message: <36d3795d.99769558@news.povray.org>
On Tue, 23 Feb 1999 18:13:00 GMT, nos### [at] despamcom (Jerry Anning)
wrote:

>I coded it as a macro using the parametric object in SuperPatch.  For
>some reason, it works fine with exponents of 1.0 (regular torus) but
>gives garbage for any other exponent.  Is it the parametric object,
>the equations in the referenced page or my bad coding?  

It appears to be a little of both the parametric object and your 
bad coding. :)  First, your bad coding:

>       function (cos(u) ^ _E1) * (_Rj + _Rn * (cos(v) ^ _E2)),
>                     (sin(u) ^ _E1) * (_Rj + _Rn * (cos(v) ^ _E2)),
>                     (sin(u) ^ _E2) *  _Rn

The z term is supposed to be based on sin(v), not sin(u).

Now the bad news: there seems to be an issue with the parametric
stuff that I don't fully understand.  It seems like only things
in the first quadrant, where both the sin and the cos are positive,
get rendered correctly.  I found an ABS in the code for exponentiation
that could have caused the problem, but removing it didn't seem to 
make the problem go away.  It's possible that I'm missing something
somewhere else in the code.  Unfortunately, I didn't write it, so
understanding it fully could be a bit of a treat.


Post a reply to this message

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