POV-Ray : Newsgroups : povray.general : Self-intersecting torus : Re: Self-intersecting torus Server Time
31 Jul 2024 18:14:50 EDT (-0400)
  Re: Self-intersecting torus  
From: Chris B
Date: 21 Oct 2006 17:30:04
Message: <453a915c$1@news.povray.org>
"Jellby" <me### [at] privacynet> wrote in message 
news:o2i### [at] badulaqueunexes...
> Hi all,
>
> I'd like to cut a torus off from a sphere or cylinder
> (difference{sphere{}torus{}}). It works ok, but I'd also like it to work
> when the torus intersects itself, i.e., when its "minor" radius is larger
> than the "major" one. If I do as before, I get two cusps shapes joined by
> an elongated shape, and I want to get rid of this last one, keeping only
> the two cusps.
>... snip ...

Hi Jellby,

I don't know that this is the easiest way, but it should do what you ask. By 
merging two copies of the torus, with one very slightly smaller than the 
other, you get the external shape without the interior surfaces. Any help?

Regards,
Chris B.

camera { location <0,0,-5> }
light_source { <10,10,-10>, rgb 1 }

#declare Rmin=1.1;
#declare Rmaj=1.0;
difference {
  sphere { 0, 1 pigment { color rgb 1 } }
  merge {
    torus  { Rmaj, Rmin  pigment { color rgb <1,0,0> } }
    torus  { Rmaj, Rmin  pigment { color rgb <1,0,0> } scale 0.999999}
  }
}


Post a reply to this message

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