# Trigonometry Question?

## Recommended Posts

This question is not strictly a VW question but I am hopefully going to use it for a Worksheet in VW.

Thinking along the lines of the "line" tool.

If I know the X displacement and the Y displacement of two objects how do I find the length between them if I dont know the angle.

In other words with the line tool If I draw a line at an angle I can look in the OIP and see that it is X long by Y high, I can then switch to polar mode and see that it is at L length and A angle.

If this polar mode wasn't available what equation would you use to work out the length from only the XY co-ordinates of the start position and the XY coordiantes of the end of the line.

Its been awhile since high school and cant remember how to do this.

Here you go.

Thanks

Have got an equation, dont know if it is of use to anyone else.

Have dropped two 2D loci on a page and named one "a" and one "b" for the purpose of what I am explaining.

Cell A2 = XCENTER((N='a'))

(=2530)

Cell A5 = YCENTER((N='a'))

(=18090)

Cell B2 = XCENTER((N='b'))

(=3230)

Cell B5 = YCENTER((N='b'))

(=17490)

Cell A1 =((A2-B2)^2)^0.5

(=700)

Cell A4 =((A5-B5)^2)^0.5

(=600)

Cell C2 = ((A1^2)+(A4^2))^0.5

(=921.954)

All this basically tells me the length between 2D loci "a" and 2D loci "b" is 921.954

Dont know if any of that makes dense to others IF you have two points a(xa,ya); b(xb,yb) the formula would be:

distance between a and b = ((xb-xa)^2+(yb-ya)^2)^0.5

I think thats basically what the above does but I have added an equation to make the result of XCentre - XCentre and YCentre - YCentre a Positive.

For example:

700-800 = -100

(-100^2)^.5 = +100

I know this is sorted out in the end line of the equation anyway but I need the results of the individual equations for something else.

FWIW, you can achieve positive numbers with the absolute value function ABS(), too.

Cell A1 =ABS(A2-B2)

(=700)

Cell A4 =ABS(A5-B5)

(=600)

Raymond

thanks that is a usefeul function I wasnt aware of

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible. ×   Pasted as rich text.   Restore formatting

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×

• KBASE
• #### MARIONETTE

×
• Create New...