|  |  | Am 02.05.2011 16:05, schrieb kurtz le pirate:
> i have this simple macro :
>
> #macro lineEquation (x1,z1,x2,z2)
>    #local det = x1-x2;
>    #if(det=0)
>      #error "\n\n---\nWarning, the system has no unique
> solution.\nProgram stop here\n\n"
>    #else
>      #local det_a = z1-z2;
>      #local det_b = (x1*z2)-(z1*x2);
>      <det_a/det, det_b/det, 0>
>    #end
> #end
For some obscure reasons, POV-Ray has some problems with assigning 
macro-generated expressions to variables. Try using:
  #macro lineEquation (x1,z1,x2,z2)
    #local det = x1-x2;
    #if(det=0)
      ...
    #else
      #local det_a = z1-z2;
      #local det_b = (x1*z2)-(z1*x2);
      #local result = <det_a/det, det_b/det, 0>;
      result
    #end
  #end
Post a reply to this message
 |  |