POV-Ray : Newsgroups : povray.general : Self-intersecting torus : Re: Self-intersecting torus Server Time
31 Jul 2024 18:27:06 EDT (-0400)
  Re: Self-intersecting torus  
From: Jellby
Date: 22 Oct 2006 05:22:52
Message: <f6pr04-c9b.ln1@badulaque.unex.es>
Among other things, John VanSickle saw fit to write:

>> #if(Rmin>Rmaj)
>>   #declare X=Rmin*sqrt(1-Rmaj*Rmaj/(Rmin*Rmin));
> 
> Why not X=sqrt(Rmin*Rmin-Rmaj*Rmaj) ?

Of course, stupid me :D

Actually, I started putting an approximate value. Then I thought that it
shouldn't be so hard to calculate it, but took the long way... and didn't
even think about simplifying. I guess I need some rest.

> You could also rewrite the difference like this:
> 
> difference {
>    sphere { 0, 1 pigment { color rgb 1 } }
>    torus  { Rmaj, Rmin  pigment { color rgb <1,0,0> } }
>    #if(Rmin>Rmaj)
>      sphere { 0,sqrt(Rmin*Rmin-Rmaj*Rmaj) }
>    #end
> }

Yes, that's probably the best. Thanks. I wish there would be some keyword
like for this in the torus shape.

About the merge proposed by Chris B, I'm afraid that would be slower, but
thanks for the suggestion.

-- 
light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby


Post a reply to this message

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