POV-Ray : Newsgroups : povray.beta-test : Array headaches Server Time
30 Jul 2024 22:17:00 EDT (-0400)
  Array headaches (Message 1 to 2 of 2)  
From: David Wallace
Subject: Array headaches
Date: 18 Sep 2001 20:34:30
Message: <3BA7E81C.BF7E485@earthlink.net>
The following code segment worked perfectly in 3.1g but seems to be
broken:

// Start Code
#declare view = array[10] {
 camera { location <-20.0, 25.0 ,-101 > look_at <140.0,  0.0 , 92.0> },
// 0. Primary view
 camera { location < 10.0,  5.0 , -1.5> look_at <  0.0,  0.6 ,  0.0> },
// 1. Medium object snapshot
 camera { location <  2.0,  0.2 , -1.0> look_at <  0.0,  0.0 ,  0.0> },
// 2. Small object snapshot
 camera { location <  0.0,800.0 , -1.0> look_at <  0.0,  0.0 ,  0.0> },
// 3. Bird's eye view
 camera { location < -1.0, 31.0 , 24.0> look_at < -1.0, 29.0 ,  0.0> },
// 4. Interior view
 camera { location <-96.0, 37.0 ,181.5> look_at <  0.5, 48.6 ,  0.0> },
// 5. Large object snapshot
 camera { location <-40.0,  8.0 , -9.0> look_at <-50.0,  1.0 ,-55.0> },
// 6. Room panorama
 camera { location < -3.0,  3.0 , 32.0> look_at <-20.0,  5.0 , 23.0> },
// 7. Altar view
 camera { location < 23.0, 15.0 , 32.0> look_at <  0.0, 40.0 ,  1.0> },
// 8. Roof view
 camera { location <  0.0,  2.0 , 18.0> look_at <  0.0,-10.0 ,-21.0> }
// 9. Organ view
}

camera { view[5] }
// End Code

I get a "Parse Error: No matching } in 'object', camera found instead"
on the last line of this section.  I use this camera array trick in
complex scenes to preserve the main shot and to debug problem areas and
component objects.  Why has this seemingly obvious use of array elements
ceased to work?


Post a reply to this message

From: Trevor Quayle
Subject: Re: Array headaches
Date: 18 Sep 2001 20:53:06
Message: <3ba7ec72@news.povray.org>
It worked for me. I just copied-and-pasted and ran it as you have it
written.

-tgq


--
camera{location z*13look_at 0}light_source{15 15looks_like{sphere{0 10
}pigment{rgb 1}finish{ambient 15}}}union{torus{3,0.5rotate x*90}cone{y
*4,.5,-y*8,0}cone{-x*4,.5,x*8,0}pigment{rgb<.7,.6,.4>}finish{ambient 0
diffuse 0reflection{1fresnel on metallic 1}}interior{ior 25}rotate 15}
plane{y,-7pigment{checker rgb 0rgb 1scale 4}finish{diffuse.1}}//   TGQ

"David Wallace" <dar### [at] earthlinknet> wrote in message
news:3BA### [at] earthlinknet...
> The following code segment worked perfectly in 3.1g but seems to be
> broken:
>
> // Start Code
> #declare view = array[10] {
>  camera { location <-20.0, 25.0 ,-101 > look_at <140.0,  0.0 , 92.0> },
> // 0. Primary view
>  camera { location < 10.0,  5.0 , -1.5> look_at <  0.0,  0.6 ,  0.0> },
> // 1. Medium object snapshot
>  camera { location <  2.0,  0.2 , -1.0> look_at <  0.0,  0.0 ,  0.0> },
> // 2. Small object snapshot
>  camera { location <  0.0,800.0 , -1.0> look_at <  0.0,  0.0 ,  0.0> },
> // 3. Bird's eye view
>  camera { location < -1.0, 31.0 , 24.0> look_at < -1.0, 29.0 ,  0.0> },
> // 4. Interior view
>  camera { location <-96.0, 37.0 ,181.5> look_at <  0.5, 48.6 ,  0.0> },
> // 5. Large object snapshot
>  camera { location <-40.0,  8.0 , -9.0> look_at <-50.0,  1.0 ,-55.0> },
> // 6. Room panorama
>  camera { location < -3.0,  3.0 , 32.0> look_at <-20.0,  5.0 , 23.0> },
> // 7. Altar view
>  camera { location < 23.0, 15.0 , 32.0> look_at <  0.0, 40.0 ,  1.0> },
> // 8. Roof view
>  camera { location <  0.0,  2.0 , 18.0> look_at <  0.0,-10.0 ,-21.0> }
> // 9. Organ view
> }
>
> camera { view[5] }
> // End Code
>
> I get a "Parse Error: No matching } in 'object', camera found instead"
> on the last line of this section.  I use this camera array trick in
> complex scenes to preserve the main shot and to debug problem areas and
> component objects.  Why has this seemingly obvious use of array elements
> ceased to work?
>
>
>
>


Post a reply to this message

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