POV-Ray : Newsgroups : povray.beta-test : functions in arrays : functions in arrays Server Time
4 Nov 2024 21:21:13 EST (-0500)
  functions in arrays  
From:
Date: 19 Sep 2001 08:47:22
Message: <6u4hqt8hk62pm6mns2v0kbej99ufvkep6s@4ax.com>
platform info: WinNT4, PII 233, 128MB, POV3.5b2

looking at behavior of arrays on example of storing objects

  #local A=sphere{10,2}
  #local B=sphere{3,7}
  #local Array=array[2]{A,B}
  #local c=sphere{Array[0]}

above example works fine
than I expect that similiar syntax for functions works such way:

  #local A=function(h){h^h}
  #local B=function(h){A(h)-h}
  #local Array=array[2]{A,B}
  #local c=Array[0](1)

but only below version is parsed ok

  #local A=function(h){h^h}
  #local B=function(h){A(h)-h}
  #local Array=array[2]{function{A(x)},function{B(x)}}
  #local c=Array[0](1,0,0)

I think it's not very logical, but perhaps there are some limitations
inside source of current engine :-(

ABX


Post a reply to this message

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