We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

# Calculating the endpoint of a straight line, given its startpoint, length and angle

on
Medium Priority
391 Views
I'm presently using automation to draw in Microsoft Visio. I have the startpoint (x0, y0), the length, and the angle with the x-axis (in degrees) of a straight line. How do i calculate the endpoint (x1, y1) ?
Comment
Watch Question

## View Solution Only

CERTIFIED EXPERT
Commented:
x1 = x0  + length*cos(angle)
y1 = y0  + length*sin(angle)

Not the solution you were looking for? Getting a personalized solution is easy.

Commented:
Yes.... d-glitch  is absolutely right..
x1 = x0  + length*cos(angle)
y1 = y0  + length*sin(angle)

All point to  d-glitch as replied first
CEO

Commented:
in case of cos/sin using radians, need to convert angle from degrees to radians :
angle = angle*PI/180 (PI=4.13152965)

Commented:
Thanks a bunch
##### Thanks for using Experts Exchange.

• View three pieces of content (articles, solutions, posts, and videos)
• Ask the experts questions (counted toward content limit)
• Customize your dashboard and profile