POV-Ray : Newsgroups : povray.newusers : tori : Re: tori Server Time
5 Sep 2024 16:19:51 EDT (-0400)
  Re: tori  
From: Tor Olav Kristensen
Date: 28 Jan 2001 18:14:51
Message: <3A74A79A.EAA54419@online.no>
"Mark M. Wilson" wrote:
> 
> With my apologies to the person who would get credit for this, but for the
> fact that I don't remember who sent it to me, and that they sent it directly
> to my other e-mail acccount, which is at home...
> Anyway, some kind soul worked out exactly what I want, and so for the
> curious among you, this is what works:
> 
> (I'm leaving out the light and camera statements)
> 
> #declare gothArch = union
> 
>     difference  // right side {
>      torus { 1, .08 pigment { Red }
>      }
>      box { <-1,-1,-2> <1,1,2>
>      pigment { Red } translate -x*.6
> 
>      }
>      box { <-1,-1,-1> <1,1,1> pigment { Red }
>       translate <1,0,-1>
>      }
>  translate -x*.4        // move the edge to the z-axis
>  rotate -x*90          // flip it upright
>         }
> 
>   difference // left side
> 
>     torus { 1, .08 pigment { Red }
>      }
>      box { <-1,-1,-2> <1,1,2> pigment { Red }
>     translate -x*.6
>  }
>     box { <-1,-1,-1> <1,1,1> pigment { Red } translate <1,0,-1>
>  }
>     translate -x*.4         // move the edge to the z-axis
>      rotate -x*90            // flip it upright
>      rotate y*180            // mirror it
>   }
>  }
> 
> object { gothArch }

This code seems to do the same:


#declare OneSide =
intersection {
  torus {
    1, 0.08
    translate <-0.4, 0, 0>
  }
  box {
    <0, -0.08, 0>, <0.68, 0.08, 1.08>
  }
}

#declare GothArch =
union {
  object {
    OneSide
  }
  object {
    OneSide
    rotate 180*z  // Or do this: scale <-1, 1, 1>
  }
  rotate -90*x
}

object {
  GothArch
  pigment { Red }
}


-- 
Best regards,

Tor Olav

mailto:tor### [at] hotmailcom
http://www.crosswinds.net/~tok/tokrays.html


Post a reply to this message

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