given a point and an angle, you can get another point at
(250+sin 0,2, 250+cos 0,2)
You can then find the intersection from the two pirs of points
http://mathworld.wolfram.c
Main Topics
Browse All TopicsI have two lines
Line A is given a angle in radian
The other line(Line B) has been given two end point.
How do I know where Line A meets to line B when Line A it is extended towards to Line B.
For example
Line A
CPoint pt(250,250)
double ang = 0.2
Line B
CPoint sp(400,0), ep(400, 300)
I want to get a Point.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
given a point and an angle, you can get another point at
(250+sin 0,2, 250+cos 0,2)
You can then find the intersection from the two pirs of points
http://mathworld.wolfram.c
ozo,
Isn't it the other way round?
(250,+cos0.2, 250+sin 0.2)
I guess cos is changes in x coor, and sin is changes in y coord
Do you have a piece of code finding intersections of two that line segment?
Link you gave me is seemed using matrix and i don't understand why is it so complicated formulars are involved
Thanks
The example above was that I just made up for better understanding of the problem.
So.... don't mind of the actual number.
What I want to have is the function that calculate the meeting point of two line segment.
angle would be radian
I examined if Line A would meet at some point with Line B by just looking at coordinates the line B.
Now, I want to have exact point of the meeting point so that I calculates the length of the Line A.
Let's define Line segment A as
double ang;
CPoint pt
and
Line Segment B as
CPoint ptStart;
CPoint ptEnd;
Code would looks like
CrossPointOfSeg(pt, ang, ptStart, ptEnd, ptCross)
so that ptCross
Thanks
Business Accounts
Answer for Membership
by: trinitrotoluenePosted on 2009-11-02 at 17:24:14ID: 25725427
since you have the slope of line A it should be possible to get the angle which it makes with the X axis
0.2 = tan(angle)
once you know the angle you can get the equation for the line using the following relation
y = m(x) + c
after that it is pretty obvious whether the 2 lines intersect or not. You can just plot them and see whether they intersect.