User Name Remember Me? Password

 Algebra Pre-Algebra and Basic Algebra Math Forum

 May 19th, 2009, 08:04 AM #1 Newbie   Joined: May 2009 Posts: 6 Thanks: 0 test if a point will be in a moving cone Hi, Here is the problem I have. I have an object in a 3D environment with a cone like field of view (think of an airship or missile, its Z direction isn't necessarely leveled) moving in a constant direction. I want to know whether another object (lets suppose for now that this other object is stationary) will eventually be in the first object's field of view. I have both object's position, a vector representing the first object's direction and speed (though speed is irrelevant here since the other object is stationary), the maximum range the object can see (which, for our cone, is basically the length of the side) and the angle between the direction vector and the side of the cone. The way I see it, to test if the second object will be in the cone eventually, we first test if it's already in the cone (which is easy, simply check if the angle between the line that links both objects is equal and the velocity vector is equal or smaller than the angle we are given. If it is, check if the distance between both objects is equal or smaller than the maximum range the object can see. Now, the problem I have is the next step. If it's not in the cone right now, how do I test to see if it will be eventually? The way I saw it was to create a cylindrical corridor with a radius equal to the cone's and with the direction vector + object position as its center. Then check if the object is within that corridor and in front of the cone. I'm really not sure how to calculate that and now that I think of it, it seems there must be a simpler way, though I'm not quite sure what it is. Thank you for your help! -=edit=- ok, I figured out how to find whether or not the second object is within the corridor. Basically, you have the angle between the first object's direction vector and the line that links both objects. You also have the distance between both objects. So you can make a triangle with the distance as the hypotenuse. We can use sine to calculate the shortest distance between the second object and the cylinder's axis. If this distance is shorter than the cylinder's radius, then the second object is inside the corridor. Now, the problem is to figure out whether or not the object is in front of the cone or not. I found a way, but it requires a whole bunch of calculations . First I need to calculate the length of the cone's axis (using cos of the angle and distance between the two objects as the hypotenuse), then normalise my direction vector, then multiply it by this length, then using that new vector and the position of the first object, I get the center of the cone's base. Then I find the vector that points from the center to the 2nd object, do a dot product with the 1st object's direction vector. If that's negative, then the 2nd object is not in front of the cone. Since this is for a software, I'd really like to figure a simpler way, if there is one. May 22nd, 2009, 11:44 AM #2 Newbie   Joined: May 2009 Posts: 6 Thanks: 0 Re: test if a point will be in a moving cone Is my question to advanced for this forum? Should it be in one of the college math forum? (and if so, which?) May 22nd, 2009, 03:24 PM #3 Senior Member   Joined: May 2008 From: York, UK Posts: 1,300 Thanks: 0 Re: test if a point will be in a moving cone You can find, presumably, a point and a unit vector which describe the position and direction of travel of your airship at time 0. This then gives an expression the position of the airship at time namely where is its speed. Given another object at a point elementary geometry shows that the perpendicular distance between this object and the line travelled by the airship is given by where denotes the vector product. Therefore, if the radius of the cone at its widest point is given by the point lies within the corridor traced out by the cone for if and only if Moreover, if the angle between and the side of the cone is then will come into the cone at some if and only if the angle between and is no larger than or if This is equivalent to the condition Therefore your two conditions for the point being seen eventually are Tags cone, moving, point, test Thread Tools Show Printable Version Email this Page Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Similar Threads Thread Thread Starter Forum Replies Last Post Jacob0793 Real Analysis 4 March 13th, 2014 06:15 PM mathkid Calculus 9 November 11th, 2012 06:26 PM mathkid Calculus 12 October 11th, 2012 07:17 PM HellBunny Algebra 4 April 9th, 2012 05:46 PM Silvester Algebra 0 February 17th, 2009 09:29 AM

 Contact - Home - Forums - Cryptocurrency Forum - Top

Copyright © 2019 My Math Forum. All rights reserved.      