  | 
  | 
 
 | 
  | 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
When I created the following SOR object in 3.6.1 it worked, but in 3.6.2 
and the beta it no longer works. Why does it no longer work, and what 
can I do to fix it?
#include "GSprites_Scene_settings.inc"      // Source of the camera and 
lighting code
#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,
   <
     cos(Angle_Start - 8 * Angle_Incrm) * Tube_Radius - Wid,
     sin(Angle_Start - 8 * Angle_Incrm) * Tube_Radius,
   >
   <
     cos(Angle_Start - 8 * Angle_Incrm) * Tube_Radius - Wid,
     sin(Angle_Start - 8 * Angle_Incrm) * Tube_Radius,
   >
   <
     cos(Angle_Start - 7 * Angle_Incrm) * Tube_Radius - Wid,
     sin(Angle_Start - 7 * Angle_Incrm) * Tube_Radius,
   >
   <
     cos(Angle_Start - 6 * Angle_Incrm) * Tube_Radius - Wid,
     sin(Angle_Start - 6 * Angle_Incrm) * Tube_Radius,
   >
   <
     cos(Angle_Start - 5 * Angle_Incrm) * Tube_Radius - Wid,
     sin(Angle_Start - 5 * Angle_Incrm) * Tube_Radius,
   >
   <
     cos(Angle_Start - 4 * Angle_Incrm) * Tube_Radius - Wid,
     sin(Angle_Start - 4 * Angle_Incrm) * Tube_Radius,
   >
   <
     cos(Angle_Start - 3 * Angle_Incrm) * Tube_Radius - Wid,
     sin(Angle_Start - 3 * Angle_Incrm) * Tube_Radius,
   >
   <
     cos(Angle_Start - 2 * Angle_Incrm) * Tube_Radius - Wid,
     sin(Angle_Start - 2 * Angle_Incrm) * Tube_Radius,
   >
   <
     cos(Angle_Start - 1 * Angle_Incrm) * Tube_Radius - Wid,
     sin(Angle_Start - 1 * Angle_Incrm) * Tube_Radius,
   >
   <
     cos(Angle_Start - 0 * Angle_Incrm) * Tube_Radius - Wid,
     sin(Angle_Start - 0 * Angle_Incrm) * Tube_Radius,
   >
   <
     cos(Angle_Start - 0 * Angle_Incrm) * Tube_Radius - Wid,
     sin(Angle_Start - 0 * Angle_Incrm) * Tube_Radius,
   >
   pigment {rgb 1}
   translate Wid
}
-- 
http://isometricland.com
 Post a reply to this message 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
Oops. Check this code instead.
#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,
   <
     cos(Angle_Start - 8 * Angle_Incrm) * Tube_Radius - Wid,
     sin(Angle_Start - 8 * Angle_Incrm) * Tube_Radius,
   >
   <
     cos(Angle_Start - 8 * Angle_Incrm) * Tube_Radius - Wid,
     sin(Angle_Start - 8 * Angle_Incrm) * Tube_Radius,
   >
   <
     cos(Angle_Start - 7 * Angle_Incrm) * Tube_Radius - Wid,
     sin(Angle_Start - 7 * Angle_Incrm) * Tube_Radius,
   >
   <
     cos(Angle_Start - 6 * Angle_Incrm) * Tube_Radius - Wid,
     sin(Angle_Start - 6 * Angle_Incrm) * Tube_Radius,
   >
   <
     cos(Angle_Start - 5 * Angle_Incrm) * Tube_Radius - Wid,
     sin(Angle_Start - 5 * Angle_Incrm) * Tube_Radius,
   >
   <
     cos(Angle_Start - 4 * Angle_Incrm) * Tube_Radius - Wid,
     sin(Angle_Start - 4 * Angle_Incrm) * Tube_Radius,
   >
   <
     cos(Angle_Start - 3 * Angle_Incrm) * Tube_Radius - Wid,
     sin(Angle_Start - 3 * Angle_Incrm) * Tube_Radius,
   >
   <
     cos(Angle_Start - 2 * Angle_Incrm) * Tube_Radius - Wid,
     sin(Angle_Start - 2 * Angle_Incrm) * Tube_Radius,
   >
   <
     cos(Angle_Start - 1 * Angle_Incrm) * Tube_Radius - Wid,
     sin(Angle_Start - 1 * Angle_Incrm) * Tube_Radius,
   >
   <
     cos(Angle_Start - 0 * Angle_Incrm) * Tube_Radius - Wid,
     sin(Angle_Start - 0 * Angle_Incrm) * Tube_Radius,
   >
   <
     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 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
Am 25.07.2010 04:30, schrieb SharkD:
> When I created the following SOR object in 3.6.1 it worked, but in 3.6.2
> and the beta it no longer works. Why does it no longer work, and what
> can I do to fix it?
Due to rounding errors, the first two and last two points in the SOR 
happen to have a negative X coordinate. While 3.6.1 seems to have 
accepted such values, 3.6.2 and 3.7 don't.
To fix it, you may explicitly set the offending points' X coordinates to 
zero. Alternatively, enclose the X coordinates in a "max(0, ...)" 
expression to force them into the non-negative domain.
 
 Post a reply to this message 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
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 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
On 7/25/2010 4:44 AM, clipka wrote:
> Due to rounding errors, the first two and last two points in the SOR
> happen to have a negative X coordinate. While 3.6.1 seems to have
> accepted such values, 3.6.2 and 3.7 don't.
>
> To fix it, you may explicitly set the offending points' X coordinates to
> zero. Alternatively, enclose the X coordinates in a "max(0, ...)"
> expression to force them into the non-negative domain.
Heh. We posted at the same time!
-- 
http://isometricland.com
 
 Post a reply to this message 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
 | 
  | 
 
 |   |  
 
 | 
  |