POV-Ray : Newsgroups : povray.advanced-users : Camera problem Server Time
30 Jul 2024 16:14:09 EDT (-0400)
  Camera problem (Message 1 to 3 of 3)  
From: Mick Hazelgrove
Subject: Camera problem
Date: 2 May 1999 06:31:15
Message: <372c1b63.0@news.povray.org>
I am trying to make a pic with a vertical/portrait aspect and I have
modified the camera thus:
camera
{    
  location  <0, -24, 99.0>
    direction -1.75*z
        up    4/3*y 
            right <1,0,0>
  look_at   <0.0, 0.0,  0.0>
}

Problem is this changes the direction of the z axis if I remove the - from the
direction the x axis is swopped.

Can anyone help?

Mick


Post a reply to this message

From: Nieminen Mika
Subject: Re: Camera problem
Date: 2 May 1999 11:22:38
Message: <372c5fae.0@news.povray.org>
Mick Hazelgrove <mha### [at] mindaswinternetcouk> wrote:
: I am trying to make a pic with a vertical/portrait aspect and I have
: modified the camera thus:

  I don't know if this answers your question, but when I make a non-4/3
camera, I make it this way:

#declare ImageWidth=512;
#declare ImageHeight=512;

camera
{ right x*ImageWidth/ImageHeight
  location <0, .24, 99>
  look_at 0
  angle 35
}

  Some notes:
  Always put the 'right' statement as the first statement of the camera
declaration.
  I always use 'angle' instead of 'direction' since I don't know how the
latter works, but 'angle' works just like I think.
  The default 'up' vector is just ok. Usually you don't have to change it.
I have never needed it, even with tilted cameras. If you want to tilt
the camera, you can rotate it. The only use of the 'up' vector I can imagine
is when you want to specify a tilt angle for the camera (and you don't know
how to apply it by rotating the camera when the camera is not at the origin):

#declare CamTiltAngle=35;

camera
{ up <sin(radians(CamTiltAngle)),cos(radians(CamTiltAngle)),0>
  location <1,2,3>
  look_at <4,5,6>
  angle 35
}

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Mick Hazelgrove
Subject: Re: Camera problem
Date: 2 May 1999 12:08:44
Message: <372c6a7c.0@news.povray.org>
Thanks I'll try that

> Mick Hazelgrove wrote:
> : I am trying to make a pic with a vertical/portrait aspect and I have
> : modified the camera thus:
>
>   I don't know if this answers your question, but when I make a non-4/3
> camera, I make it this way:
>
> #declare ImageWidth=512;
> #declare ImageHeight=512;
>
> camera
> { right x*ImageWidth/ImageHeight
>   location <0, .24, 99>
>   look_at 0
>   angle 35
> }
>
>   Some notes:
>   Always put the 'right' statement as the first statement of the camera
> declaration.
>   I always use 'angle' instead of 'direction' since I don't know how the
> latter works, but 'angle' works just like I think.
>   The default 'up' vector is just ok. Usually you don't have to change it.
> I have never needed it, even with tilted cameras. If you want to tilt
> the camera, you can rotate it. The only use of the 'up' vector I can
imagine
> is when you want to specify a tilt angle for the camera (and you don't
know
> how to apply it by rotating the camera when the camera is not at the
origin):
>
> #declare CamTiltAngle=35;
>
> camera
> { up <sin(radians(CamTiltAngle)),cos(radians(CamTiltAngle)),0>
>   location <1,2,3>
>   look_at <4,5,6>
>   angle 35
> }
>
> --
> main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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