POV-Ray : Newsgroups : povray.unofficial.patches : trace() not working with isosurfaces? : Re: trace() not working with isosurfaces? Server Time
2 Sep 2024 02:17:38 EDT (-0400)
  Re: trace() not working with isosurfaces?  
From: Tim Riley
Date: 19 Jul 2000 14:09:24
Message: <3975EECF.97D54001@its.bldrdoc.gov>
Disnel wrote:
> 
> I don't think so. It works when I replace isosurface with
> box or sphere (and I think, that px and pz are declared locally
> in macro). And it does not work when I replace them with
> ax or az, as you wrote.
> 
> Which version od MegaPOV are you using? I use Linux version.
> 
> Fabien Mosen wrote:
> >
> > The problem is due to the fact that you use the same variable
> > names in the macro and in the loop.  This works :
> >
> > #macro PlaceTree(ax, az)
> >   #local Normal=<0, 0, 0>;
> >   #local Where = trace(Landscape, <ax, 10, az>, <0, -1, 0>, Normal);
> >   #if (Normal.x = 0 & Normal.y = 0 & Normal.z = 0)
> >     #warning "Tree not placed\n"
> >   #else
> >     object {Tree translate Where}
> >   #end
> > #end

Another problem is that "Normal" is a reserved word. When I changed it
to something else (such as "Norm"), it worked.


Post a reply to this message

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