POV-Ray : Newsgroups : povray.general : Please Help Me Find My Stupid Mistake : Re: Please Help Me Find My Stupid Mistake Server Time
3 Aug 2024 04:15:09 EDT (-0400)
  Re: Please Help Me Find My Stupid Mistake  
From: Mike Williams
Date: 6 May 2004 15:25:40
Message: <$P1zNDAyDpmAFw8J@econym.demon.co.uk>
Wasn't it Dave Matthews who wrote:
>The code below works, but by my reasoning it shouldn't.  I had to move a 
>"}" to what is "clearly" the "wrong" location (obviously it isn't wrong, 
>since it works; what is wrong is my logic.)  When I close out my objects 
>the way I think I should, I get a parse error.  Can someone spot my 
>mistake?


The problem is that the Ball_And_Stick() macro doesn't return an object,
it returns two objects. So you can't say

  object { Ball_And_Stick(Source_Points,Destination_Points,0.5, 0.1) }


You can fix it by saying

  union { Ball_And_Stick(Source_Points,Destination_Points,0.5, 0.1) }


or by making Ball_And_Stick() return a single union of the two objects

  union {
    object { Source_Triangle }
    object { Destination_Triangle }
  }
  ...
  object { Ball_And_Stick(Source_Points,Destination_Points,0.5, 0.1) }


The error message isn't very helpful, but I guess that the POV parser
got just as confused as you did.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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