POV-Ray : Newsgroups : povray.general : Clipping : Re: Clipping Server Time
7 Aug 2024 21:25:46 EDT (-0400)
  Re: Clipping  
From: Warp
Date: 7 Jun 2001 07:09:19
Message: <3b1f60df@news.povray.org>
I think it can be made more easily and efficiently:

#macro TorusSegment(MajRad, MinRad, Angle)
  #local Ang = abs(Angle);
  #if(Ang >= 360) torus { MajRad, MinRad }
  #else
    intersection
    { torus { MajRad, MinRad }
      #if(Ang>180) union { #end
        plane { -x,0 }
        plane { x,0 rotate -y*Ang }
      #if(Ang>180) } #end
      #local Dim = MajRad+MinRad;
      bounded_by { box { -<Dim,MinRad,Dim>, <Dim,MinRad,Dim> } }
      #if(Angle<0) scale <-1,1,1> #end
    }
  #end
#end


-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

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