POV-Ray : Newsgroups : povray.beta-test : Initialisation of a 4-vector array : Initialisation of a 4-vector array Server Time
16 Jun 2021 09:51:30 EDT (-0400)
  Initialisation of a 4-vector array  
From: mm
Date: 24 Jan 2002 05:55:55
Message: <3c4fe83b@news.povray.org>
pov 3.5 b 10

win

With the following, w4[0].t is not set correctly.

w4[1].t and w4[2].t are set correctly.

Curiously, this does not happen with an array of only 2 elements.



  #local a = array[3] {0.123, 0.456, 0.789}
  #local w = array[3] {x, y, z}
  #local w4 = array[3]

  #local ix = 0;
  #while (ix<3)
    #declare w4[ix] = a[ix]*t + w[ix];
    #debug concat(str(a[ix], 6, 3), " ", str(w4[ix].t,6,3),"\n")
    #local ix=ix+1;
  #end


Post a reply to this message

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