Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Joe_John

Member

01-04-2010 01:33 PM

Options

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Solved! Go to Solution.

johnsold

Knight of NI

01-04-2010 01:52 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

From the Analytic Geometry sections of some math handbooks:

The equation of a line passing through two points is: (y-y1)/(x-x1) = (y2-y1)/(x2-x1)

The general form of the equation for a straight line is: A*x + B*y + C = 0

The angle omega between two lines A1*x + B1*y +C1 = 0 and A2*x + B2*y + C2 = 0 is tan omega = (A1*B2 - B1*A2)/(A1*A2 + B1*B2)

You can do the math to convert the equation in two-points form to the general form to get the angle.

Lynn

ben64

Trusted Enthusiast

01-04-2010 01:52 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

That's basic linear algebra. Use the dot product of 2 vectors to find the cosinus of the angle between these vectors.

Ben

--------------------------------------------------

The best way to say thanks is to give kudos!

The best way to say thanks is to give kudos!

01-04-2010 02:48 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

I'm still a little confused. do you have any exmples that might help?

Solution

Accepted by topic author Joe_John

ben64

Trusted Enthusiast

01-04-2010 02:57 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Here is a way to do it. You can also use the math functions to do it as Lynn suggested.

Ben

--------------------------------------------------

The best way to say thanks is to give kudos!

The best way to say thanks is to give kudos!

01-04-2010 03:14 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

aeastet

Trusted Enthusiast

01-04-2010 03:21 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

This is the long way to do it.

Tim

GHSP

GHSP

01-04-2010 03:28 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

thanks
here is my code modified to work

altenbach

Knight of NI

12-15-2019 12:15 PM - edited 12-15-2019 12:34 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

I am aware that this thread is very old, but things gets much simpler if we use __complex math__. Try it!

(see also)

billko

Proven Zealot

12-16-2019 11:26 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

@altenbach wrote:

I am aware that this thread is very old, but things gets much

if we usesimpler. Try it!mathcomplex

So are you saying that the ** real **solution is to use

Bill

(Mid-Level minion.)

My support system ensures that I don't look totally incompetent.

Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

Humble author of the CLAD Nugget.

(Mid-Level minion.)

My support system ensures that I don't look totally incompetent.

Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

Humble author of the CLAD Nugget.