POV-Ray : Newsgroups : povray.newusers : "infinite" mirrors Server Time
3 Nov 2024 01:11:16 EDT (-0400)
  "infinite" mirrors (Message 1 to 5 of 5)  
From: Rick Seiden
Subject: "infinite" mirrors
Date: 24 Sep 2002 09:40:15
Message: <web.3d906ae1bccecd8a52acff50@news.povray.org>
I created a mirror box using six planes, put a few spheres, a light, and a
camera inside it, and expected to see it going on "for ever", but was
surprised to see it going for only 4 reflections.  Is this normal, or is
there a setting I'm missing?

Thanks
Rick Seiden

// Standard pre-defined colors
//
#include "colors.inc"
// macros for generating various shapes
//
#include "shapes.inc"

#include "textures.inc"
// perspective (default) camera
camera {
  location  <1.0, 2, 4>
  look_at   <0.0, 0.0,  0>
}


// create a regular point light source
light_source {
   <0, 1, 0>
  color White    // light's color
}

// create a sphere shape
sphere {
  <5,0, 0> // center of sphere <X Y Z>
  0.5       // radius of sphere
  texture {pigment {color Red}}
}
// create a sphere shape
sphere {
  <0,5, 0> // center of sphere <X Y Z>
  0.5       // radius of sphere
  texture {pigment {color White}}
}
// create a sphere shape
sphere {
  <0,0, 5> // center of sphere <X Y Z>
  0.5       // radius of sphere
  texture {pigment {color Blue}}
}
// create a sphere shape
sphere {
  <-5,0, 0> // center of sphere <X Y Z>
  0.5       // radius of sphere
  texture {pigment {color White}}
}
// create a sphere shape
sphere {
  <0,-5, 0> // center of sphere <X Y Z>
  0.5       // radius of sphere
  texture {pigment {color Blue}}
}
// create a sphere shape
sphere {
  <0,0, -5> // center of sphere <X Y Z>
  0.5       // radius of sphere
  texture {pigment {color Red}}
}


// An infinite planar surface
// plane {<A, B, C>, D } where: A*x + B*y + C*z = D
plane {
  z, // <X Y Z> unit surface normal, vector points "away from surface"
  5.0 // distance from the origin in the direction of the surface normal
  hollow on // has an inside pigment?
  texture { finish {ambient 0  diffuse 0 reflection 1}}

}


// An infinite planar surface
// plane {<A, B, C>, D } where: A*x + B*y + C*z = D
plane {
  z, // <X Y Z> unit surface normal, vector points "away from surface"
  -5.0 // distance from the origin in the direction of the surface normal
  hollow on // has an inside pigment?
  texture {finish {ambient 0  diffuse 0 reflection 1}}

}


plane {
  x,-5
  hollow on
  texture {finish {ambient 0  diffuse 0 reflection 1}}
}
plane {
  x,5
  hollow on
  texture {finish {ambient 0  diffuse 0 reflection 1}}
}
plane {
  y,-5
  hollow on
  texture {finish {ambient 0  diffuse 0 reflection 1}}
}
plane {
  y,5
  hollow on
  texture {finish {ambient 0  diffuse 0 reflection 1}}
}

// create a curved tube object translating a sphere along a certain path
sphere_sweep {
  linear_spline                 // linear curve
  //cubic_spline                // alternative spline curves
  //b_spline
  16,                            // number of specified sphere positions
  <-5,5,-5>, 0.25       //a 1
  <-5,5,5>, 0.25        //b 2
  <5,5,5>, 0.25         //c 3
  <5,5,-5>, 0.25        //d 4
  <-5,5,-5>, 0.25       //a 5
  <-5,-5,-5>, 0.25      //h 6
  <5,-5,-5>, 0.25       //e 7
  <5,5,-5>, 0.25        //d 8
  <5,-5,-5>, 0.25       //e 9
  <5,-5,5>, 0.25        //f 0
  <5,5,5>, 0.25         //c 1
  <5,-5,5>, 0.25        //f 2
  <-5,-5,5>, 0.25       //g 3
  <-5,5,5>, 0.25        //b 4
  <-5,-5,5>, 0.25       //g 5
  <-5,-5,-5>, 0.25      //h 6
  //tolerance 0.001             // optional
  texture {pigment {color White}}
}



--

---------------------------------
Growing OLDER is required
Growing UP is optional


Post a reply to this message

From: Warp
Subject: Re: "infinite" mirrors
Date: 24 Sep 2002 09:44:51
Message: <3d906c53@news.povray.org>
See the section 6.11.7 of the POV-Ray 3.5 documentation.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Ken
Subject: Re: "infinite" mirrors
Date: 24 Sep 2002 09:49:38
Message: <3D906E9D.B6AF253@pacbell.net>
Rick Seiden wrote:
> 
> I created a mirror box using six planes, put a few spheres, a light, and a
> camera inside it, and expected to see it going on "for ever", but was
> surprised to see it going for only 4 reflections.  Is this normal, or is
> there a setting I'm missing?

Add - global_settings{max_trace_level n}

Where n is the number of levels of reflection you want.

-- 
Ken Tyler


Post a reply to this message

From: Tom Melly
Subject: Re: "infinite" mirrors
Date: 24 Sep 2002 11:00:28
Message: <3d907e0c$1@news.povray.org>
"Ken" <tyl### [at] pacbellnet> wrote in message
news:3D9### [at] pacbellnet...
>
>
> Where n is the number of levels of reflection you want.
>

1/0 apparently....

Rick, as well as the docs, take a look at Warp's VFAQ
http://www.students.tut.fi/~warp/povQandT/
for this and other common problems/misconceptions.


Post a reply to this message

From:
Subject: Re: "infinite" mirrors
Date: 24 Sep 2002 13:55:09
Message: <3d90a78c.8521092@news.povray.org>
On Tue, 24 Sep 2002 16:00:27 +0100, "Tom Melly" <tom### [at] tomandlucouk>
wrote:

>>
>> Where n is the number of levels of reflection you want.
>>
>
>1/0 apparently....

Dialling the reflection down to .95 makes it max out on 109 levels.

/Erkki


Post a reply to this message

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