POV-Ray : Newsgroups : povray.newusers : How to make a reflection on a mirror Server Time
29 Jul 2024 18:28:56 EDT (-0400)
  How to make a reflection on a mirror (Message 1 to 7 of 7)  
From: Ziyan
Subject: How to make a reflection on a mirror
Date: 29 Jun 2005 08:00:00
Message: <web.42c28c6495d8c9ea58f113480@news.povray.org>
How to achieve the following:
a bunch of light rays on a mirror then reflected by the mirror, the angle of
incidence is equal to the angle of reflection.
Thanks a lot.


Post a reply to this message

From: Daniel Hulme
Subject: Re: How to make a reflection on a mirror
Date: 29 Jun 2005 08:11:23
Message: <20050629131122.46721c50@dh286.pem.cam.ac.uk>
> How to achieve the following:
> a bunch of light rays on a mirror then reflected by the mirror, the
> angle of incidence is equal to the angle of reflection.
Look at section 3.5.3.4 of the manual, which describes the "reflection"
keyword. In short, to make an object perfectly reflective like a mirror,
you want to write something like:

plane {
  x,0
  finish {
    reflection {1.0}
    ambient 0
    diffuse 0
  }
}

-- 
"The  rules  of  programming  are  transitory;  only  Tao  is  eternal.
 Therefore you  must contemplate Tao before you receive  enlightenment."
"How will I know when I have received enlightenment?"  asked the novice.
"Your program will then run correctly," replied the master.


Post a reply to this message

From: Ziyan
Subject: Re: How to make a reflection on a mirror
Date: 29 Jun 2005 09:25:01
Message: <web.42c2a012b257086258f113480@news.povray.org>
Okay, I tried this with a HORIZONTAL mirror, but the reflection is
incorrect, not reflected by the horizontal mirror, and seems reflected by a
vertical ones. And another question, why the light turns stranger even
though I put the extinction to 0.5.

global_settings {
    assumed_gamma 1
    max_trace_level 5
    photons {
        count 150000
        max_trace_level 9
        media 100, 2
    }
}

background { color <0.000,0.000,0.000> }

camera {
         location <0,3,-10>
         angle 120
         up 1*y
         right 1.333*x
         look_at <0,3,0>
         translate <0,0,0>
         }

light_source {   // Spotlight Spotlight001
  <20.0, 10, 0.0>
  color rgb <1.000, 0.000, 0.000>*20
  cylinder
    point_at  <-20, -10, 0.000>
    falloff    0.268  // outer radius (in deg)
    radius     0.238  // inner radius
    tightness  0.000
  media_attenuation on
  photons {refraction on reflection on}
  }

light_source {   // Light001
  <0.0, 0.0, 0.0>
  color rgb <1.000, 1.000, 1.000>
  media_interaction off
  }

background { color <0,0,0> }

//
// ********  OBJECTS  *******
//

box { // Cube001
  <-1, -1, -1>, <1, 1, 1>
  pigment {
      color rgbft <0, 0, 0, 1, 1>
   }

   interior {
      media {
         method 3
         intervals 1
         ratio 1
         scattering {
            1, rgb <1, 1, 1>
            extinction 0.5
         }
      }
   }
   scale 20
   hollow
}


plane {
  y,2
  finish {
    reflection {1.0}
    ambient 0
    diffuse 0
  }
  photons {
         target
         refraction on
         reflection on
         collect off
      }

}


Post a reply to this message

From: Stephen McAvoy
Subject: Re: How to make a reflection on a mirror
Date: 29 Jun 2005 09:37:12
Message: <3095c11oc9utt2o3d41hlt6bb84gq5sj74@4ax.com>
On Wed, 29 Jun 2005 09:20:18 EDT, "Ziyan" <beg### [at] hotmailcom>
wrote:

>Okay, I tried this with a HORIZONTAL mirror, but the reflection is
>incorrect, not reflected by the horizontal mirror, and seems reflected by a
>vertical ones. And another question, why the light turns stranger even
>though I put the extinction to 0.5.

It looks ok to me. In Povray the y plane is the vertical plane. If you
have been using Moray the y plane is the horizontal plane. What do you
mean "the light turns stranger"?

Regards
        Stephen


Post a reply to this message

From: Ziyan
Subject: Re: How to make a reflection on a mirror
Date: 29 Jun 2005 09:55:00
Message: <web.42c2a72fb257086258f113480@news.povray.org>
Stephen McAvoy <mca### [at] aolcom> wrote:
> On Wed, 29 Jun 2005 09:20:18 EDT, "Ziyan" <beg### [at] hotmailcom>
> wrote:
>
> >Okay, I tried this with a HORIZONTAL mirror, but the reflection is
> >incorrect, not reflected by the horizontal mirror, and seems reflected by a
> >vertical ones. And another question, why the light turns stranger even
> >though I put the extinction to 0.5.
>
> It looks ok to me. In Povray the y plane is the vertical plane. If you
> have been using Moray the y plane is the horizontal plane. What do you
> mean "the light turns stranger"?
>
> Regards
>         Stephen

Thank you for your reply.
Then how could I realize the horizontal mirror in POVray?
As for the "the light turns stranger", I mean the intensity of the light
should be weakened by using parameter "extinction", but it seems that it
doesn't work at all. Could you help me with my programme?


Post a reply to this message

From: Stephen McAvoy
Subject: Re: How to make a reflection on a mirror
Date: 29 Jun 2005 10:44:16
Message: <n8c5c15aod6r5g2kabiod9biahrq6jpacs@4ax.com>
On Wed, 29 Jun 2005 09:50:39 EDT, "Ziyan" <beg### [at] hotmailcom>
wrote:

>
>Thank you for your reply.
>Then how could I realize the horizontal mirror in POVray?
>As for the "the light turns stranger", I mean the intensity of the light
>should be weakened by using parameter "extinction", but it seems that it
>doesn't work at all. Could you help me with my programme?
>
You need to brush up on your coordinates :-) 
So do I as I use Moray to make my scenes 
I've modified your scene for the mirror to be in the horizontal plane.
In real life you would not expect to see extinction over such short
distances so I've added unrealistic values. Truth be told I don't
think this is what you want. 
I'm sure someone else will take over as I'm on the road shortly.
Read
help 3.4.7.9 & 3.6.2.1.3 

///////////////////////////////////////////////

global_settings {
    assumed_gamma 1
    max_trace_level 5
    photons {
        count 150000
        max_trace_level 9
        media 100, 2
    }
}

background { color <0.000,0.000,0.000> }

camera {
         location <0,0,10>
        
         up 1*y
         right 1.333*x
         look_at <0,0,0>   
          angle 120
         translate <0,0,0>
         }

light_source {   // Spotlight Spotlight001
      
   <20.0, 10, 0.0>
  color rgb <1.000, 1.000, 0.000>*50
  cylinder
    point_at  <0, 0, 0.000>
    falloff    0.268  // outer radius (in deg)
    radius     0.238  // inner radius
    tightness  0.000    
    
    fade_distance 4
    fade_power 3     
 
 /* 
 Read the help 3.4.7.9  Light Fading
 the above values are not realistic
 */
    
  media_attenuation on
  photons {refraction on reflection on}    
  
  }

light_source {   // Light001
  <0.0, 0.0, 0.0>
  color rgb <1.000, 1.000, 1.000>
  media_interaction off
  }

background { color <0,0,0> }

//
// ********  OBJECTS  *******
//

box { // Cube001
  <-1, -1, -1>, <1, 1, 1>
  pigment {
      color rgbft <0, 0, 0, 1, 1>
   }

   interior {
      media {
         method 3
         intervals 1
         ratio 1
         scattering {
            1, rgb <1, 1, 1>
            extinction 0.25
         }
      }
   }
   scale 20
   hollow
}


plane {
 x, -1                  // -1 to put the plane below the camera
  finish {
    reflection {1.0}
    ambient 0
    diffuse 0
  }
  photons {
         target
         refraction off // with 100% reflection there will be no
refraction
         reflection on
         collect off
      }

}




Regards
        Stephen


Post a reply to this message

From: Warp
Subject: Re: How to make a reflection on a mirror
Date: 29 Jun 2005 11:28:31
Message: <42c2be1f@news.povray.org>
Ziyan <beg### [at] hotmailcom> wrote:
> As for the "the light turns stranger", I mean the intensity of the light
> should be weakened by using parameter "extinction", but it seems that it
> doesn't work at all. Could you help me with my programme?

  I think that you want "fade_distance" and "fade_power", not "extinction".

-- 

                                                          - Warp


Post a reply to this message

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