Path: news.mathworks.com!not-for-mail
From: "Sadik " <sadik.hava@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Deciding which side a numerically generated line you are on
Date: Sat, 17 Jan 2009 00:09:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 28
Message-ID: <gkr7it$4s4$1@fred.mathworks.com>
References: <gkr5ue$8b5$1@fred.mathworks.com>
Reply-To: "Sadik " <sadik.hava@gmail.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1232150941 4996 172.30.248.37 (17 Jan 2009 00:09:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 17 Jan 2009 00:09:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1666517
Xref: news.mathworks.com comp.soft-sys.matlab:512161

"Dale" <hazelREMOVETHISnusse@gmail.com> wrote in message <gkr5ue$8b5$1@fred.mathworks.com>...
> I am looking at a number of functions of two variables (say x and y), and I am restricting my attention to x \in [-pi/2, pi/2] and y \in [-pi, pi].  Call this set S \subset R^2.  The problem is such that I really only want to look at some of the data in this subset of the plane.  I numerically generate some boundary curves that separate feasible (x,y) coordinates from infeasible ones (by solving a system of two equations in two unknowns), and I need to be able to decide if an arbitrary point in S is on one side or the other side of the numerically generated curve.  I have the points on the curve as a 2xn array, each column of which is a point (x,y) on the curve.  
> 
> Here is a link to what the boundary curves look like:
> http://www.dlpeterson.com/feasible_lean_steer.pdf
> 
> The reason for why I need to do this is because on one side of my curve I can't compute a number of the quantities and if I try, I run into a slew of other numerical non-convergence issues due to the inherent infeasibility of points on that side of the line.
> 
> Any ideas?
> 
> Thanks,
> Luke

Hello Luke,

Just for brainstorming purposes.

You know that the power of a point inside a circle is negative. It is zero if it is on the boundary and it is positive if it is outside. This power is given by:

F(x,y) = (x-xc)^2 + (y-yc)^2 - r^2

for a circle of radius r centered at (xc,yc).

Looking at the curves you have given, if you could use their equations in a similar manner, you could define the power of a point with respect to a given curve. Heuristically, I would expect to see negative power values in the upper right infeasible region with respect to the again upper right curve because the points are in the "interior" region of that curve.

Just an idea. Hope it helps a bit.

Thanks.