|
|
On 5/27/2019 7:36 PM, William F Pokorny wrote:
> On the povray.general group and in the recent thread:
>
> http://news.povray.org/povray.general/thread/%3C5ce2a3dd%241%40news.povray.org%3E/
>
>
> IGM / igmar asked about applying transforms to user_defined cameras. The
> documentation implies transform modifiers can be applied, but this is
> not the case in v38 as of today.
>
> The following modification to the shipped user_defined.pov camera scene
> works - as far as it goes - as a way to apply transforms to the user
> defined cameras.
>
> #declare Fxfrm = function {
> transform { // Given use below:
> rotate <50, 0, 0> // Stuff happens. Sometimes OK
> // translate <0.1,0,0> // Stuff happens. Sometimes OK
> // scale 2.0 // 1.0 0.5 2.0 -1.0 Always OK
> }
> }
>
> //------- Set up functional camera
> #declare FnXrad = function (x) { (x+0.5)*tau }
> #declare FnX = function (x) { cos(FnXrad(x)) }
> #declare FnZ = function (x) { sin(FnXrad(x)) }
> #declare CameraUserDefined = camera {
> user_defined
> location {
> function { Fxfrm(FnX(x),0,0).x }
> function { Fxfrm(0,y,0).y }
> function { Fxfrm(0,0,FnZ(x)).z }
> }
> direction {
> function { Fxfrm(-FnX(x),0,0).x }
> function { Fxfrm(0,0,0).y }
> function { Fxfrm(0,0,-FnZ(x)).z }
> }
> }
>
> For some user cameras and transforms might be just whats needed. See the
> attached image for some results. For more complex situations, especially
> with rotation, we'd need to handle/re-map the modified vector's x,y,z
> components from all the modified original vectors back into the
> appropriate x,y,z inputs for location and direction. My head is too
> tired to handle that bit at the moment...
>
> Bill P.
Are there examples on the web of all the weird stuff you could do with a
user defined camera? IIRC someone created a scene years ago of how the
relativistic effects of a fast moving vehicle can change what you see,
from both the viewpoint of the passenger and the bystander. Would a user
defined camera help here?
Michael
Post a reply to this message
|
|