POV-Ray : Newsgroups : povray.general : Intensity Mapping Server Time
30 Jul 2024 16:13:49 EDT (-0400)
  Intensity Mapping (Message 1 to 2 of 2)  
From: Colin
Subject: Intensity Mapping
Date: 17 Dec 2008 18:15:01
Message: <web.4949877aa539e03623f6cd3b0@news.povray.org>
Hello,

First, sorry for the cross-post. It appears this forum is getting more traffic.

I'd like to use POV-Ray to evaluate light positioning and reflector design, and
thus would like to be able to map relative light intensities on a flat surface.
How might this be accomplished?

Thanks,
Colin


Post a reply to this message

From: Florian Siegmund
Subject: Re: Intensity Mapping
Date: 20 Dec 2008 08:50:00
Message: <web.494cf7a467084438b370bafa0@news.povray.org>
"Colin" <nomail@nomail> wrote:
> Hello,
>
> First, sorry for the cross-post. It appears this forum is getting more traffic.
>
> I'd like to use POV-Ray to evaluate light positioning and reflector design, and
> thus would like to be able to map relative light intensities on a flat surface.
> How might this be accomplished?
>
> Thanks,
> Colin

Hello Colin,

Did you think about the possibility of using photons for this purpose? I don't
know which types of reflectors you have especially in mind, but i think you
mean mirrors with parabolic surface curvature and such stuff, so i've written
some lines of code to demonstrate how this could work. The values in the first
lines of the code are meant to be changed by the user (by yourself in this
case) for testing and seeing the results by 'trial and error' - and to make it
easier for you to write your own source code for what ever you need it. (Since
I do not know whether you are a beginner, or rather an advanced pov-ray user,
'cause I saw your post in the 'advanced users' thread first).

Code starts here:

#declare Version = 0;  /* 0 = official version; 1 = unofficial MegaPOV
(uses exposure in this case) */
#declare Camera_view = 0;  /* 0 = perspective view (whole scene); 1 =
orthographic view (flat surface only) */
#declare Reflector_scl = 1/16;  // size of the reflector
#declare Reflector_trans = 0.2*y;  // location of the reflector
#declare Reflector_structure = 1;  // strength of the normal pattern
#declare Reflector_2_rel_scl = 0.7*<1.125, 1, 1>;  /* relative scale of the
small reflector part */
#declare Reflector_2_rot = 4*x;  // rotation of the small reflector part
#declare Light_bulb_col = color green 1;  // color of the light bulb
#declare Light_bulb_brtness = 0.06;  // brightness of the light bulb
#declare Photons_spc = 0.001; /* photons spacing; use smaller values to see more
details */


global_settings {
    photons {spacing Photons_spc}
    #if (Version)
        #version unofficial MegaPOV 1.0;
        exposure 0.003
        exposure_gain 260
    #end
}

#if (Camera_view)
    camera {
        orthographic
        location -y
        up 0.2*z
        right 0.8/3*y
        sky z
        look_at 0
    }
#else
    camera {
        location <-0.4, 0.5, -0.8>
        look_at 0.05*y
        angle 35
    }
#end

sky_sphere {
    pigment {
        wrinkles
        scale <0.1, 0.025, 0.1>
        color_map {
            [0     color blue 0.05]
            [0.5  color blue 0.06]
            [1     color blue 0.2]
        }
    }
}

#declare Paraboloid_Y = quadric {<1, 0, 1>, <0, 0, 0>, <0, 1, 0>, 0}

#declare Flat_sf_obj =
disc {
    0, y, 0.2
    pigment {
        checker
        color rgb 0.75
        color rgb 0.95
        scale 0.05
    }
    finish {ambient 0.01}
    no_shadow
}

#declare Reflector_1_obj =
difference {
    object {Paraboloid_Y  translate 0.1*y}
    object {Paraboloid_Y}
    plane {<0, -0.75, 1>, 0}
    plane {y, -2}
    scale Reflector_scl
}

#declare Reflector_2_obj =
difference {
    object {Paraboloid_Y  translate 0.1/0.75*y}
    object {Paraboloid_Y}
    plane {y, -0.125}
    scale Reflector_scl*Reflector_2_rel_scl
    translate Reflector_scl*Reflector_2_rel_scl/4*y
    rotate Reflector_2_rot
    translate -Reflector_scl*Reflector_2_rel_scl/4*y
    translate -Reflector_scl/4*(1-Reflector_2_rel_scl)*y
}

#declare Reflector_1_norm = normal {quilted  0.06*Reflector_structure  control0
1  control1 1  scale 0.0075}
#declare Reflector_2_norm = normal {quilted  0.05*Reflector_structure  control0
1  control1 1  scale 0.005}

#declare Reflector_tex =
texture {
    pigment {color rgb 0.85}
    finish {
        ambient 0.05
        diffuse 0.1
        reflection {1  fresnel}
        specular 1
        roughness 0.002
        brilliance 3
    }
}

#declare Reflector_obj =
union {
    object {
        Reflector_1_obj
        texture {
            Reflector_tex
            normal {Reflector_1_norm}
        }
    }
    object {
        Reflector_2_obj
        texture {
            Reflector_tex
            normal {Reflector_2_norm}
        }
    }
    interior {ior 10}
    translate Reflector_trans
    photons {
        target
        reflection on
        collect off
    }
}

#declare Light_bulb_loc = Reflector_trans - Reflector_scl/4*y;

#declare Light_bulb_ls =
light_source {
    Light_bulb_loc
    color Light_bulb_col*Light_bulb_brtness
    area_light x*Reflector_scl/8, z*Reflector_scl/8, 6, 6
    circular
    orient
    jitter
    looks_like {
        sphere {
            0, Reflector_scl/10
            pigment {color Light_bulb_col*Light_bulb_brtness*100}
            finish {ambient 1  diffuse 0}
        }
    }
}

light_group {
    light_source {Light_bulb_ls}
    disc {
        -0.0001*y, y, 0.2
        pigment {color rgb 1}
        finish {ambient 0  diffuse 0.1}
        double_illuminate
    }
    light_group {
        light_source {
            <2, 4, -0.7>  color rgb 0.1
            area_light
            x*0.55, z*0.55, 12, 12
            circular
            orient
            jitter
            photons {reflection off}
        }
        object {Flat_sf_obj}
        object {Reflector_obj}
    }
}

Regards, Flo


Post a reply to this message

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