0

I have a paint program that does not deal with angles. Drawing a straight line will only get point of origin and length, no matter where you draw it to. So, I need to draw a line 570 mm or pixels, at a 35 degree angle. Thus I need the vertical length, and horizontal length to fix my points on.

  • Trigonometric functions are available on most calculators. They often accept directly the angle in degrees, though they might happen to be set to radians. To discern it, calculate "$\sin 90$" and see if you get $1$ or an ugly number $\approx 0.89$. –  Aug 13 '16 at 20:43
  • I voted to close as unclear, since I'm not unclear whether this question is missing context or is off-topic entirely. – Asaf Karagila Aug 13 '16 at 21:19
  • On a 2D paint program without angle of line, you need to know triangularization calculations to set an angle off of horizontal, or vertical. Such as a seatback 570 mm long, set at an angle of 35 degrees off of vertical. Make sense now? – S R Hampton Aug 14 '16 at 07:31

2 Answers2

2

A line of length $l$ starting at the origin of the plane and making an acute angle of $\theta$ with the positive $x$-axis will have coordinates $(l\cos\theta,l\sin\theta)$. Here $\sin\theta$ and $\cos\theta$ are the sine and cosine trigonometric functions.

1

Starting at point $(0,0)$ and proceeding in a northeast direction:

$$x_2 = 570\times\cos(35^\circ) = 466.9$$ $$y_2 = 570\times\sin(35^\circ) = 326.9$$

  • So, to my case in point... I set point (A), line out horizontal 466.9 (B), then upward 326.9 (C). Thus between A and C is a 570 line, set at 35 degrees to horizontal? How badly would this be off if i used 467 to point B, and then 327 to point C? – S R Hampton Aug 14 '16 at 07:39
  • @SRHampton You'd be off, very roughly, 0.03%, if I'm interpreting you correctly. – Inquisitive Aug 14 '16 at 14:03
  • 1
    Thank you so much! I'll write this down before I forget. Cool. If I can live with being off spec by a micrometre, then 0.03% of a degree won't hurt. – S R Hampton Aug 15 '16 at 01:43