|
![](/i/fill.gif) |
On Tue, 23 Feb 1999 18:13:00 GMT, nos### [at] despam com (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
|
![](/i/fill.gif) |