POV-Ray : Newsgroups : povray.advanced-users : Problems with trace() Server Time
1 Nov 2024 05:21:43 EDT (-0400)
  Problems with trace() (Message 1 to 3 of 3)  
From: Tim Nikias v2 0
Subject: Problems with trace()
Date: 13 Jun 2003 12:06:47
Message: <3ee9f697@news.povray.org>
Does it make a difference if I declare an array filled with objects
like this:

#declare Object_List=array[3] { sphere{...},cylinder{},box{} }

or like this:
#declare Object_List=array[3]
#declare Object_List[1]=sphere{...}
#declare Object_List[2]=cylinder{...}
#declare Object_List[3]=box{...}

Somehow my algorithm has no problems with first version,
but doesn't run properly with second (and yes, the array is
fully declared before that part runs).

I'm looking further into this, but I found this very strange. I'll
experiment with using the same objects in both versions
and move on from there. Perhaps someone already knows
something I should know... :-)

-- 
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: Tim### [at] gmxde


Post a reply to this message

From: Christoph Hormann
Subject: Re: Problems with trace()
Date: 13 Jun 2003 12:16:07
Message: <3EE9F8C7.D3BBCB12@gmx.de>
"Tim Nikias v2.0" wrote:
> 
> Does it make a difference if I declare an array filled with objects
> like this:
> 
> #declare Object_List=array[3] { sphere{...},cylinder{},box{} }
> 
> or like this:
> #declare Object_List=array[3]
> #declare Object_List[1]=sphere{...}
> #declare Object_List[2]=cylinder{...}
> #declare Object_List[3]=box{...}

Don't you think you should better use:

#declare Object_List=array[3]
#declare Object_List[0]=sphere{...}
#declare Object_List[1]=cylinder{...}
#declare Object_List[2]=box{...}

???

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 28 Feb. 2003 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Tim Nikias v2 0
Subject: Re: Problems with trace()
Date: 13 Jun 2003 20:11:16
Message: <3eea6824@news.povray.org>
Well, yeah. That was a typo in the message, not
in the actual code. I'll continue stating something when
I've experimented some more...

-- 
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: Tim### [at] gmxde

>
>
> "Tim Nikias v2.0" wrote:
> >
> > Does it make a difference if I declare an array filled with objects
> > like this:
> >
> > #declare Object_List=array[3] { sphere{...},cylinder{},box{} }
> >
> > or like this:
> > #declare Object_List=array[3]
> > #declare Object_List[1]=sphere{...}
> > #declare Object_List[2]=cylinder{...}
> > #declare Object_List[3]=box{...}
>
> Don't you think you should better use:
>
> #declare Object_List=array[3]
> #declare Object_List[0]=sphere{...}
> #declare Object_List[1]=cylinder{...}
> #declare Object_List[2]=box{...}
>
> ???
>
> Christoph
>
> -- 
> POV-Ray tutorials, include files, Sim-POV,
> HCR-Edit and more: http://www.tu-bs.de/~y0013390/
> Last updated 28 Feb. 2003 _____./\/^>_*_<^\/\.______


Post a reply to this message

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