How to calculate four points...?
1 Attachment(s)
Hi guys...
One more problem.. Do let me know if this post doesnt belong to this category.. If so, den which category it belongs.. Coz am writing c++ programs to solve it... Anyhow, Pls refer to the image diagram attached along this post.. You will find 5 points.. I need to calculate points a, b, c and d.. SO i thought i would begin by finding points a, d lengths (Pa) = (Pd), is not constant.. it may vary every time.. it is called "along boundary length".. So, for a given along boundary length, i need to find these two points a, and d, with respect to P in such a way that, Quote:
First way i thought was to find the tangent(shown in green), of "along boundary length" and get two end points.. from these two end points i can draw a line which will intersect the arc, and i can get values of "a" and "d"... But now i feel this logic is having some fault.. Now am stuck up.. My ultimate goal is to find values of points a, b, c and d for given set of inputs: 1. Point P 2. along boundary length l(Pa), l(Pd) 3. off boundary length l(ab), l(cd) Any way to get this solved..?? Thanks in advance 
Re: How to calculate four points...?
Your question is way too unclear...
what is along and off boundary length? Does a b c d have to be in some form or any shape? Please post the exact question you are suppose to solve, so that we can understand properly 
Re: How to calculate four points...?
Ok.. The line drawn is assumed to be a boundary (assume it as ocean boundary or Great wall of china).. and the alongboundary length is the distance between point P and point a & point P and point d..
offboundary length means the distance away from the boundary.. in this case distance between point p and mid point of line bc.. Actually, the flow goes something like this.. In this system: 1) user will first input the points of the arc(connected line).. Using these points, connected line is drawn.. Among these points one point is point P.. 2) Next user will define a region to perform some operation. This region is defined by i) Inputting the point of interest around which the region is defined. Here in our example, point P is the point of interest, where user wants to define a region. ii) Inputting the alongboundary length. Using this length, we need to find the points A and D.. iii) Inputting the offboundary length.. Once Points A and D are estimated, next step is to estimate, points B and C in such a way that distance of point P and midpoint(BC) is equal to the offboundary length. And these two points need to be perpendicular to point of interest P. 3) After estimating all four points, users region is defined. And this region has to be in a rectangular shape. 4) Once the area is defined, further processing is done.. Any more queries, then pls feel free to ask.. I hope this information makes my problem understandable..... 
Re: How to calculate four points...?
don't know im having hard time understanding your question, moreover i dont get what you are trying to do nor whats the purpose of your program....i guess someone else should try answering to you...

Re: How to calculate four points...?
First a couple of things don't make sense. You can't have a tangent
to a point, and you can only be perpendicular to a line, not a point. For what you call a tangent to P, are you taking a line through P that is parallel to the line AD? That is OK. Also if the midpoint of the line BC is the "off boundary length" L1 distance from P, you can find that by bisecting the angle aPd and taking the distance L1 along that line. You can draw parallel lines to that which pass through A and D: Code:
X Line through PX is perpendicular to PW, or to ad whichever you prefer. dY and aZ parallel to PW Line cWb is perpendicular to PW, or parallel with PX, whichever is easier. 
Re: How to calculate four points...?
Quote:
Quote:
Quote:
Quote:
Quote:
1) trying to find the line (X1X2) of length 2(off boundary length) Here we'll get two end points of this new line.. 2) Using these end points, i can draw two more lines, which intersect any of two line segments from the set of line segments.. (as shown in diagram below) Code:
/ So i had just drawn that line.. It has nothing to do with my problem.. This method got some flaw.. Which i came to know later.. coz length PX2 is not equal to length Pa.. i guess it's not becoming more complicated.. My problem is my poor explanation method.. 
Re: How to calculate four points...?
Is the border of the area you wish to calculate PabcdP?
> i mean the distance between point P and line BC should be equal to the off boundary length OK, but at what angle? Will angles dPW and aPW in my diagram be equal, and will the line PW bisect the angle aPd? All points distance L1 from P will describe a circle around P of radius L1 so how do you know which direction to go on? 
Re: How to calculate four points...?
suppose we draw an virtual line from "d" to "a", then, line BC must be parallel to this virtual line AD...
Quote:
Thanks 
Re: How to calculate four points...?
Code:
X I would suggest that the first place to start is to bisect angle dPa (which, with polar coords representing Pd and Pa as vectors from P, can be done by averaging the two theta values of Pd and Pa). Then you can calculate point W as a polar offset from P: you've got theta from the previous calculation, and r is just the offboundary distance. Line cWb is the perpendicular to line PW and you can find formulae to calculate perpendicular lines easily enough; try Googling some relevant terms and see what you come up with. Line dY is parallel to PW and passes through point d, and again a formula to get a line parallel to another and passing through a known point should be easy enough to find. The intersection (again, for formulae, Google it) of the last two lines (i.e. Wc and dc) gives you the location of c, and then just mirror this lot to find. 
All times are GMT +5.5. The time now is 01:54. 