POV-Ray : Newsgroups : povray.general : simulating lens distortion : Re: simulating lens distortion Server Time
6 Aug 2024 19:28:48 EDT (-0400)
  Re: simulating lens distortion  
From: bob h
Date: 29 Jan 2002 09:28:01
Message: <3c56b171@news.povray.org>
"Bill Brehm" <bbr### [at] netzeronet> wrote in message
news:3c56a705@news.povray.org...
> I see. I was searching for "_map" instead of "normal", since I thought I
was
> looking for normal_map, slope_map, etc.
>
> Can I create my own patterns or are patterns something that are hardcoded
> into POVRay?
>
> I'd like to create a pattern where the further a point is from the center
of
> the pattern (input side of function), the more its distance from the
center
> is amplified (output side of function). For example, if the distance from
> the center of the pattern was the square of the distance of its original
> distance from the center.

You have to build patterns from what's already there; or using version 3.5
(beta) make functions into patterns, but I'm not able to help with that
really.

Far as camera normal goes you can still try something like:

camera
{
  location <0,0,-5>
  look_at <0,0,0>
normal
{
    spherical
    slope_map
    {
        [0 <1,0>] // outermost
        [.5 <.25,.25>] // 'tween (idea is: position, amount)
        [1 <0,1>] // innermost
    }
    frequency -1 // invert
    bump_size 1
    scale 1
}
}


plane {z,0 pigment {checker color rgb 0 color rgb 1}}

light_source {-10*z, 1}


I can't tell you how to go about doing the kind of control you're wanting
except to say the indices of the slope_map can be #while looped and values
applied within that.  Maybe that helps you some anyway.  Someone else would
be better at figuring that out, not me though... and hopefully I described
the example right too.  ;-)

bob h


Post a reply to this message

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