POV-Ray : Newsgroups : povray.general : projective transformations : Re: projective transformations Server Time
31 Jul 2024 08:23:32 EDT (-0400)
  Re: projective transformations  
From: Chris B
Date: 25 Jul 2007 16:15:51
Message: <46a7af77$1@news.povray.org>
"Chris B" <c_b### [at] btconnectcomnospam> wrote in message 
news:46a7a673@news.povray.org...
>
> "mimmo" <dom### [at] unitnit> wrote in message 
> news:web.46a7697cabf1811949aa3f520@news.povray.org...
>> Is it possible to use projective transformations in povray?
>> I'd need to adapt a checker to an irregular four-sided, planar figure and
>> this cannot be done using only affine transformations such as rotations,
>> scaling transformations, translations and their compositions.
>>
>> Thank you,
>> mimmo
>>
>
> Hi Mimmo,
>
> I believe you should be able to do this by defining a function to use as a 
> pigment (though I've not tried it and don't know the maths you'd need). 
> ... snip ...

Here's what I arrived at through messing about for a couple of minutes with 
that trying to get a perspective-like pattern:

camera {location <0, 0,-20> look_at  0}
light_source { <-20, 20, -20> color rgb <1,1,1>}

#include "functions.inc"
#declare FOO = function {pigment { checker scale 10} }

plane {-z,0
   pigment {
     function { FOO(x/y*20,sqrt(y)*100,z).green}
   }
}

Regards,
Chris B.


Post a reply to this message

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