POV-Ray : Newsgroups : povray.newusers : SOR-Segments possible? : Re: SOR-Segments possible? Server Time
29 Jul 2024 04:26:45 EDT (-0400)
  Re: SOR-Segments possible?  
From: Mike Williams
Date: 14 Aug 2006 03:13:04
Message: <E12yyAAHFC4EFwoy@econym.demon.co.uk>
Wasn't it Stephan Kuhagen who wrote:
>Hello
>
>I need a SOR-object with only a partial rotation of the curve. Is this
>possible? For explanation: I try to generate some kind of shaped
>pie-graphics from segments of a SOR-Object, lets say four segments with
>different angles  representing some quota of the full pie. So I need
>partially rotated SORs and then putting them together (with optionally some
>gap between them, so I cant use simply one cylinder and a texture).
>
>Is this possible? I found these function{ f_algbr_cyl?(..., SOR_ANGLE)} but
>that seems not realy, what I need, or I do not understand how it works...

Probably the easiest way is to take the full SOR object and use CSG with
a pair of rotated planes.

// Ensure A2 is greater than A1
#if (A1 > A2)
  #declare Temp =A2;
  #declare A2 = A1;
  #declare A1 = Temp;
#end

// The CSG is different for angles over 180
#if ((A2-A1)>180) 
  difference {
  object {MySor}
  intersection {
    plane {-x,0 rotate y*A1}
    plane {x,0 rotate y*A2}
    texture {T1}
  }
}#else
  intersection {
  object {MySor}
  intersection {
    plane {x,0 rotate y*A1}
    plane {-x,0 rotate y*A2}
    texture {T1}
  }
}#end


-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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