POV-Ray : Newsgroups : povray.programming : Re: Infinate cylinders Server Time
29 Jul 2024 14:13:03 EDT (-0400)
  Re: Infinate cylinders (Message 1 to 3 of 3)  
From: Thorsten Froehlich
Subject: Re: Infinate cylinders
Date: 20 Jul 1999 03:41:09
Message: <37942815@news.povray.org>
In article <3793B451.295DB2FE@hotmail.com> , our### [at] hotmailcom  wrote:

> "shapes.inc" defines a cylinder of infinite length that runs along the
> X axis as:
>
> #declare Cylinder_X =
>  quadric
>   {<0, 1, 1>,
>    <0, 0, 0>,
>    <0, 0, 0>, -1
>   }
>
> Is there some similar way to generate an infinite 2D array of these
> cylinders along with some way to either control their spacing or
> diameter?

Yes, using the #while...#end Directive:

#declare CountZ=0;
#while (CountZ < 5)
  #declare CountY=0;
  #while (CountY < 5)
    object{Cylinder_X translate <0, CountY*3, CountZ*3>}
    #declare CountY=CountY+1;
  #end
  #declare CountZ=CountZ+1;
#end


    Thorsten


PS: The group povray.programming is for discussing the POV-Ray source code,
not scene creation problems. I have cross-posted this to povray.newusers.


Post a reply to this message

From: Nieminen Mika
Subject: Re: Infinate cylinders
Date: 20 Jul 1999 05:28:31
Message: <3794413f@news.povray.org>
In povray.newusers Thorsten Froehlich <tho### [at] trfde> wrote:
:> Is there some similar way to generate an infinite 2D array of these
:> cylinders

: Yes, using the #while...#end Directive:

  Nope. You can't make an infinite array with a #while-loop. It would take
forever.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Margus Ramst
Subject: Re: Infinate cylinders
Date: 20 Jul 1999 09:25:56
Message: <37947901.6CEE3AE3@peak.edu.ee>
Well, you can make it infinite for almost all practical purposes. But the object
count, coupled with the slow quadric, would take their toll on render/parse
time.

Margus

Nieminen Mika wrote:
> 
>   Nope. You can't make an infinite array with a #while-loop. It would take
> forever.
> 
> --
> main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Infinate cylinders
Date: 20 Jul 1999 12:18:08
Message: <3794a140@news.povray.org>
In article <3794413f@news.povray.org> , Nieminen Mika <war### [at] cctutfi>  
wrote:

> : Yes, using the #while...#end Directive:
>
>   Nope. You can't make an infinite array with a #while-loop. It would take
> forever.

You can...as you know the POV-Ray coordinate system is finite (yes, I know
that this is a trick, but it does its job). It will just take up a lot of
memory (the 5*5 cylinders where just an example).


     Thorsten


____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Ken
Subject: Re: Infinate cylinders
Date: 20 Jul 1999 12:21:11
Message: <3794A17C.A9E0353F@pacbell.net>
Thorsten Froehlich wrote:
> 
> In article <3794413f@news.povray.org> , Nieminen Mika <war### [at] cctutfi>
> wrote:
> 
> > : Yes, using the #while...#end Directive:
> >
> >   Nope. You can't make an infinite array with a #while-loop. It would take
> > forever.
> 
> You can...as you know the POV-Ray coordinate system is finite (yes, I know
> that this is a trick, but it does its job). It will just take up a lot of
> memory (the 5*5 cylinders where just an example).
> 
>      Thorsten

Thorsten slides through with a techinical loophole... <Grin>

-- 
Ken Tyler
  
mailto://tylereng@pacbell.net
http://home.pacbell.net/tylereng/links.htm


Post a reply to this message

From: Chris Huff
Subject: Re: Infinate cylinders
Date: 20 Jul 1999 14:03:25
Message: <3794B9EF.2F51FE64@compuserve.com>
[canceled and moved here to povray.newusers]
You can't make an infinite array of cylinders, the isosurface requires
bounds and there has to be a limit to the number of intersections
anyway. However, using either the isosurface or  the #while directive
you could make one big enough to appear infinite, or make a small array
of cylinders and put it in a mirrored box along with the camera. With
the mirrored box, the distance would be limited only by max_trace_level,

but anything else in the scene would also be replicated.


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Infinate cylinders
Date: 20 Jul 1999 15:53:44
Message: <3794d3c8@news.povray.org>
In article <3794A17C.A9E0353F@pacbell.net> , Ken <tyl### [at] pacbellnet>  
wrote:

>> You can...as you know the POV-Ray coordinate system is finite (yes, I know
>> that this is a trick, but it does its job). It will just take up a lot of
>> memory (the 5*5 cylinders where just an example).
>>
>>      Thorsten
>
> Thorsten slides through with a techinical loophole... <Grin>

True ;-)
 I have to admit that I didn't read the original post correctly: I
(miss)read (or assumed) that he asked how to create a finite number of
elements...


    Thorsten


____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Alberto
Subject: Re: Infinate cylinders
Date: 21 Jul 1999 13:12:44
Message: <37960002.6EB1A57D@ma.usb.ve>
Thorsten Froehlich wrote:

>
> You can...as you know the POV-Ray coordinate system is finite (yes, I know
> that this is a trick, but it does its job). It will just take up a lot of
> memory (the 5*5 cylinders where just an example).
>
>      Thorsten

I didn't know that. Could you tell me (us) the size of the coordinate system?

Alberto.


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Infinate cylinders
Date: 21 Jul 1999 14:42:52
Message: <379614ac@news.povray.org>
In article <37960002.6EB1A57D@ma.usb.ve> , Alberto <ame### [at] mausbve>  
wrote:

>
>
> Thorsten Froehlich wrote:
>
>>
>> You can...as you know the POV-Ray coordinate system is finite (yes, I know
>> that this is a trick, but it does its job). It will just take up a lot of
>> memory (the 5*5 cylinders where just an example).
>>
>>      Thorsten
>
> I didn't know that. Could you tell me (us) the size of the coordinate system?

Well, for example the ray/object intersection test will not work as expected
for objects more than 1.0e17 away. But the default maximum distance is only
1.0e7 (10.000.000) by anyway.  NOTE: These are default values, on some
platforms these values may be smaller (or larger).

So if you have enough memory (and a modified compile of POV-Ray for a 64 bit
processor (so that 'int' is 64 bit) with some adjustments) you can place
1e12 (1.000.000.000.000) cylinders in a 10*10 grid...I wounder if POV-Ray
could deal with that many objects.  I would estimate the memory need around
200 TB (tera byte).


    Thorsten


____________________________________________________
Thorsten Froehlich
e-mail: mac### [at] povrayorg

I am a member of the POV-Ray Team.
Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

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