POV-Ray : Newsgroups : povray.beta-test : vector operators in macros : Re: vector operators in macros Server Time
29 Jul 2024 08:21:32 EDT (-0400)
  Re: vector operators in macros  
From: David Wallace
Date: 7 Jul 2002 03:11:14
Message: <3d27e992@news.povray.org>
Funny, I modified the function shortly after my first post and it worked:

#macro fnChamfer(sx,sy,sz,c)
max(abs(x)-sx,abs(y)-sy,abs(z)-sz,abs(x)+abs(y)-sx-sy+c,abs(x)+abs(z)-sx-sz+
c,abs(y)+abs(z)-sy-sz+c) #end

#declare lBrick = isosurface {
 function { fnChamfer(lbSiz.x*.5,lbSiz.y*.5,lbSiz.z*.5,lbCut) +
fnpCut(x,y,z)*lbCut*.2 }
 max_gradient 10
 accuracy 0.005
 contained_by { box { -lbSiz*.5, lbSiz*.5 } }
}

It's anything but efficient, but it proved your point.

"Thorsten Froehlich" <tho### [at] trfde> wrote in message
news:3d20d93d$1@news.povray.org...
> In article <3d20b773@news.povray.org> , "David Wallace"
> <dar### [at] earthlinknet> wrote:
>
> > POV seems to reject the use of the vector dot operator in macros:
>
> No, your problem is that you are trying to access a vector inside a
function
> which isn't allowed.
>
>     Thorsten
>
> ____________________________________________________
> Thorsten Froehlich
> e-mail: mac### [at] povrayorg
>
> I am a member of the POV-Ray Team.
> Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

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