POV-Ray : Newsgroups : povray.advanced-users : SOR used to work, but no longer : Re: SOR used to work, but no longer Server Time
29 Jun 2024 01:50:28 EDT (-0400)
  Re: SOR used to work, but no longer  
From: SharkD
Date: 25 Jul 2010 04:44:46
Message: <4c4bf97e$1@news.povray.org>
The workaround was to clip the values at 0, like so:

#local Tiles_Width = 64;
#local Tube_Radius = Tiles_Width/2/cos(pi/4) * 5/4;
#local Wid = Tiles_Width/2;
#local Angle_Start = acos(Wid/Tube_Radius);
#local Angle_Incrm = 2/8 * Angle_Start;
sor
{
   11,
   <
     max(0,cos(Angle_Start - 8 * Angle_Incrm) * Tube_Radius - Wid),
     sin(Angle_Start - 8 * Angle_Incrm) * Tube_Radius,
   >
   <
     max(0,cos(Angle_Start - 8 * Angle_Incrm) * Tube_Radius - Wid),
     sin(Angle_Start - 8 * Angle_Incrm) * Tube_Radius,
   >
   <
     max(0,cos(Angle_Start - 7 * Angle_Incrm) * Tube_Radius - Wid),
     sin(Angle_Start - 7 * Angle_Incrm) * Tube_Radius,
   >
   <
     max(0,cos(Angle_Start - 6 * Angle_Incrm) * Tube_Radius - Wid),
     sin(Angle_Start - 6 * Angle_Incrm) * Tube_Radius,
   >
   <
     max(0,cos(Angle_Start - 5 * Angle_Incrm) * Tube_Radius - Wid),
     sin(Angle_Start - 5 * Angle_Incrm) * Tube_Radius,
   >
   <
     max(0,cos(Angle_Start - 4 * Angle_Incrm) * Tube_Radius - Wid),
     sin(Angle_Start - 4 * Angle_Incrm) * Tube_Radius,
   >
   <
     max(0,cos(Angle_Start - 3 * Angle_Incrm) * Tube_Radius - Wid),
     sin(Angle_Start - 3 * Angle_Incrm) * Tube_Radius,
   >
   <
     max(0,cos(Angle_Start - 2 * Angle_Incrm) * Tube_Radius - Wid),
     sin(Angle_Start - 2 * Angle_Incrm) * Tube_Radius,
   >
   <
     max(0,cos(Angle_Start - 1 * Angle_Incrm) * Tube_Radius - Wid),
     sin(Angle_Start - 1 * Angle_Incrm) * Tube_Radius,
   >
   <
     max(0,cos(Angle_Start - 0 * Angle_Incrm) * Tube_Radius - Wid),
     sin(Angle_Start - 0 * Angle_Incrm) * Tube_Radius,
   >
   <
     max(0,cos(Angle_Start - 0 * Angle_Incrm) * Tube_Radius - Wid),
     sin(Angle_Start - 0 * Angle_Incrm) * Tube_Radius,
   >
   pigment {rgb 1}
   translate Wid
}


Post a reply to this message

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