POV-Ray : Newsgroups : povray.general : visibility Server Time
17 Nov 2024 01:13:25 EST (-0500)
  visibility (Message 1 to 5 of 5)  
From: Kevin Loney
Subject: visibility
Date: 12 Jul 2003 18:09:20
Message: <3f108710@news.povray.org>
does someone have the calculations neccesary for determining wherther a
point is within the fov given the location of the point and all the
information regarding the camera?

-- 
Kevin
http://www.geocities.com/qsquared_1999/


Post a reply to this message

From: Chris Amshey
Subject: Re: visibility
Date: 13 Jul 2003 01:00:01
Message: <web.3f10e64cce84657e61b99e900@news.povray.org>
Kevin Loney wrote:
>does someone have the calculations neccesary for determining wherther a
>point is within the fov given the location of the point and all the
>information regarding the camera?
>
>Kevin
>http://www.geocities.com/qsquared_1999/
>
Ve went over some of those issues in:
http://news.povray.org/povray.newusers/32157/

--Chris


Post a reply to this message

From: Kevin Loney
Subject: Re: visibility
Date: 13 Jul 2003 13:29:15
Message: <3f1196eb@news.povray.org>
not quite what I'm looking for. probably should have said viewing frustum
instead of fov

-- 
Kevin
http://www.geocities.com/qsquared_1999/
#macro _(r)#if(r<12)#local i=asc(substr(
"oqshilacefg",r,1))-97;disc{<mod(i,7)-3,
div(i,7)-1,6>,z,.4pigment{rgb 10}}_(r+1)
#end#end _(1)//KL


Post a reply to this message

From: Chris Amshey
Subject: Re: visibility
Date: 13 Jul 2003 15:50:01
Message: <web.3f11b716ce84657e61b99e900@news.povray.org>
Kevin Loney wrote:
>not quite what I'm looking for. probably should have said viewing frustum
>instead of fov
>
>Kevin
>http://www.geocities.com/qsquared_1999/
>#macro _(r)#if(r<12)#local i=asc(substr(
>"oqshilacefg",r,1))-97;disc{<mod(i,7)-3,
>div(i,7)-1,6>,z,.4pigment{rgb 10}}_(r+1)
>#end#end _(1)//KL
>

It should work out with the same math, though if the camera isn't pointing
along
an axis you'll need to work harder, but all the basic formulae are there for
figuring it out. The problem is just phrased differently in this case, but
fundamentally 'is point P inside this shape' is solvable from 'how wide is
this
shape at distance D' ... ie, the formula for describing the shape is there.
Between the location of the camera, the direction of the camera, and the
viewing rectangle at distance D, you can find the four lines that border the
fustrum, and from four lines you just check if P is between them.

 I may make some macros for this later, but right now I'm busy
with getting some cylinders to touch tangentially (which I can do when they
are
outside each other but not when one is inside the other... have to
double-check
my math, obviously.)

--Chris


Post a reply to this message

From: ABX
Subject: Re: visibility
Date: 14 Jul 2003 02:34:41
Message: <vej4hv8hvffb3ftdgeld06696afnci9dok@4ax.com>
On Sat, 12 Jul 2003 16:20:30 -0600, "Kevin Loney" <kev### [at] ekoikcom> wrote:
> does someone have the calculations neccesary for determining wherther a
> point is within the fov given the location of the point and all the
> information regarding the camera?

You can use http://news.povray.org/povray.text.scene-files/23663/ for
calculating coordinates on screen. If coordinates returned from Vector_To_Screen
macro are outside <-.5,-.5>-<.5,.5> then original vector is outside fov.

ABX


Post a reply to this message

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