POV-Ray : Newsgroups : povray.advanced-users : Aren't these perpendicular? Server Time
30 Jul 2024 08:29:09 EDT (-0400)
  Aren't these perpendicular? (Message 1 to 7 of 7)  
From: David Fontaine
Subject: Aren't these perpendicular?
Date: 19 Jan 2000 23:16:51
Message: <3886899D.DEF3CD7C@faricy.net>
camera { location <50,50,-50> look_at <20,0,0> up
<50-50*sqrt(2),sqrt((50*sqrt(2)+30)/2),-sqrt((50*sqrt(2)+30)/2)> }

Why does it complain?

--
Homepage: http://www.faricy.net/~davidf/
___     ______________________________
 | \     |_       <dav### [at] faricynet>
 |_/avid |ontaine      <ICQ 55354965>


Post a reply to this message

From: Mark Wagner
Subject: Re: Aren't these perpendicular?
Date: 20 Jan 2000 00:23:09
Message: <38869bbd@news.povray.org>
David Fontaine wrote in message <3886899D.DEF3CD7C@faricy.net>...
>camera { location <50,50,-50> look_at <20,0,0> up
><50-50*sqrt(2),sqrt((50*sqrt(2)+30)/2),-sqrt((50*sqrt(2)+30)/2)> }
>
>Why does it complain?


Because the 'right' vector may not be perpendicular to the other two.  Try
adding this to your camera:

right
vcross(<50-50*sqrt(2),sqrt((50*sqrt(2)+30)/2),-sqrt((50*sqrt(2)+30)/2)>,(<50
,50,-50>-<20,0,0>))

You might need to multiply the vcross by -1 to get the correct coordinate
system (Left-handed or right-handed).

Mark


Post a reply to this message

From: Nieminen Juha
Subject: Re: Aren't these perpendicular?
Date: 20 Jan 2000 03:03:23
Message: <3886c14b@news.povray.org>
You will save yourself a lot of trouble if you just rotate the camera.

-- 
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: David Fontaine
Subject: Re: Aren't these perpendicular?
Date: 20 Jan 2000 20:09:43
Message: <3887AF3A.C6F77C1A@faricy.net>
>   You will save yourself a lot of trouble if you just rotate the camera.

You can do that? I'll have to try it out, but the math is fairly simple so I
didn't mind doing it (except the part about it not working).

--
Homepage: http://www.faricy.net/~davidf/
___     ______________________________
 | \     |_       <dav### [at] faricynet>
 |_/avid |ontaine      <ICQ 55354965>


Post a reply to this message

From: David Fontaine
Subject: Re: Aren't these perpendicular?
Date: 20 Jan 2000 20:10:00
Message: <3887AF4D.BB67D7EA@faricy.net>
> Because the 'right' vector may not be perpendicular to the other two.  Try
> adding this to your camera:

Does it default to something?

--
Homepage: http://www.faricy.net/~davidf/
___     ______________________________
 | \     |_       <dav### [at] faricynet>
 |_/avid |ontaine      <ICQ 55354965>


Post a reply to this message

From: Mark Wagner
Subject: Re: Aren't these perpendicular?
Date: 21 Jan 2000 00:35:57
Message: <3887f03d@news.povray.org>
David Fontaine wrote in message <3887AF4D.BB67D7EA@faricy.net>...
>> Because the 'right' vector may not be perpendicular to the other two.
Try
>> adding this to your camera:
>
>Does it default to something?


Yes, it defaults to <4/3,0,0>, but is modified when the look_at (but not the
'up') is changed so that it stays pointing in a direction perpendicular to
the direction the camera is pointing.

Mark


Post a reply to this message

From: Nieminen Juha
Subject: Re: Aren't these perpendicular?
Date: 21 Jan 2000 04:07:32
Message: <388821d4@news.povray.org>
David Fontaine <dav### [at] faricynet> wrote:
:>   You will save yourself a lot of trouble if you just rotate the camera.

: You can do that?

  Yes. For example:

camera { location -z*10 look_at 0 angle 35 rotate x*45+y*30 }


: I'll have to try it out, but the math is fairly simple so I
: didn't mind doing it (except the part about it not working).

  Yes, the math is simple if you know it, but sometimes it's just easier to
rotate.

-- 
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.