POV-Ray : Newsgroups : povray.beta-test : Function weirdness : Function weirdness Server Time
31 Jul 2024 00:30:46 EDT (-0400)
  Function weirdness  
From: Slime
Date: 17 Sep 2001 21:01:30
Message: <3ba69cea$1@news.povray.org>
I have this simple function...

function {
     #local normvec = vnormalize(x,y,z);
     vlength(normvec)+f_noise3d(normvec.x,normvec.y,normvec.z)-1
}

I'm trying to get the normal vector of the current x,y,z coordinate being
tested, but it appears to think i'm referring to the variables x=<1,0,0>,
y=<0,1,0>, and z=<0,0,1>, so it gives me the error "Parse Error: Expected
')', , found instead" on the line with the "local" statement.

Is this a bug, or do I need to do this some other way? Trying
#local normlen = sqrt(x^2+y^2+z^2)
also caused an error.

- Slime
[ http://www.teja.nu/slime/ ]
[ http://www.teja.nu/slime/images ]


Post a reply to this message

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