POV-Ray : Newsgroups : povray.newusers : using arrays in functions : using arrays in functions Server Time
29 Jul 2024 06:21:44 EDT (-0400)
  using arrays in functions  
From: stefan berke
Date: 30 May 2006 11:14:19
Message: <447c614b$1@news.povray.org>
hi, is there any way of using an array like
MAP[mZ][mX] = float in a function?

say:
   #local fun = function(x,y,z) { map[z][x] }
results in:
    >Float expected but vector or color expression found<
and:
    #local fun=function(A,B) { map[A][B] }
results in:
    >expected numeric expression, undeclared identifier 'A' found instead<

any way you put it, it's like arrays where not accepted by
the parser.
i wanted to create an isosurface & pigments out of an array of heightdata.
ok, i could stuck together some mesh
from the array but still cannot use it for the pigments if
theres no wrapper from arrays to functions.

anyone a hint please?


Post a reply to this message

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