You are not logged in.
Pages: 1
Hey Bob, you're the man.. seriously!
I haven't had a chance to test this out yet, but you are still the man.
Thanks
Ronny
Hi Bob
Many thanks once again for your ideas.
The background is that I'm writing some software that needs this result. So I think your idea of first testing which quadrant the line segment is in, and modifying the result could work. Might be easier than finding an ideal formula that works in every case.
I'll let you know how it goes.
Cheers
Ronny
Thanks Bob, that is so kind of you to give such a detailed explanation, but I am having some trouble.
Im assuming:
That if my line segment is from
And my point is at
Then
So if
and andThen
Good.
But if the line segment is going in the opposite direction, ie it still starts at
but ends at ,And I get an angle of 90, when I was hoping for 270.
Any clues?
Thanks once again for your assistance.
Cheers
Ronny
Thanks Bob for the detailed explanation, but Im not sure if it gives me what I want, as I dont think it takes the directed nature of the line segment into account.
Let me know if Ive gotten this wrong:
But if the line segment starts at (2, 2) and ends at (1, 1) the slope is 1.
If it starts at (2, 2) and ends at (3, 3) the slope is also 1. The slope is the same, and therefore the end angle is the same, but I want a different answer.
Not sure if this is pushing the friendship, but what is the scalar product solution, and would that help with the directed line segment?
Much appreciated!
Cheers
Ronny
Thanks Bob for your time and the explanation. I hope you weren't too distracted whilst trimming your hedges and that they look ok.
I will give it a whirl and post my result.
And yes, the original post was the same - no spam, no advertisements, no bad jokes.
Cheers
Ronny
Apologies if you have already replied to this.. I posted this earlier but somehow it was deleted (as was my newly created account!!). I hope I didn't offend the powers that be with my question
I have a directed line segment and a point, and I need to determine the angle of intersection between:
1. The line from the point to the start of the directed line segment
2. The directed line segment
For example if the directed line segment is from (2, 2) to (1, 1), and I have a point at (3, 1), then the angle would be 90 degrees. But from the point (1, 3) the angle would 270 degrees.
And if the segment was from (2, 2) to (3, 3), then from (3, 1) the angle would be 270 degrees, and from (1, 3) it would be 90 degrees
This is probably a one off question, so just the formula would be more than appreciated.. although if you dont know the answer, any tips would be good as well.
Many thanks
Pages: 1