1.77 A graphic artist is creating a new logo for her company’s website. In the graphics program she is using, each pixel in an image file has coordinates (x, y), where the origin (0, 0) is at the upper left corner of the image, the +x-axis points to the right, and the +y-axis points down. Distances are measured in pixels.


1.77 A graphic artist is creating a new logo for her company’s website. In the graphics program she is using, each pixel in an image file has coordinates (x, y), where the origin (0, 0) is at the upper left corner of the image, the +x-axis points to the right, and the +y-axis points down. Distances are measured in pixels. (a) The artist draws a line from the pixel
location (10, 20) to the location (210, 200). She wishes to draw a second line that starts at (10, 20) is 250 pixels long, and is at an angle of 30 degrees measured clockwise from the first line. At which pixel location should this second line end? Give your answer to the nearest pixel. (b) The artist now draws an arrow that connects the lower right end of the first line to the lower right end of the second line. Find the length and direction of this arrow. Draw a diagram showing all three lines.

SOLUTION

Move the coordinate plane such that the origin $(0, 0)$ as in Figure 1 is now at $(10, 20)$ as shown in Figure 2. Both are drawn not to scale.
Figure 1

Figure 2

The components of vector $\vec{A}$ are

$A_x=200 \ px$ and

$A_y=180 \ px$.

Then its magnitude is, $A=\sqrt{(A_x)^2+(A_y)^2}=269.1 \ px$, to solve for direction $\alpha= arctan (\frac{A_y}{A_x})=42.0^o$. We can now solve for the components of $\vec{B}$, where the angle is measured from the +x-axis and rotates toward the +y-axis,

$B_x=(250 \ px) \ cos \ (30^o+42.0^o)=77.3 \ px$

$B_y=(250 \ px) \ sin \ (30^o+42.0^o)=237.8 \ px$

We will return our original coordinate plane as in Figure 1, then $B_x=77.3 \ px+10 \ px =87 \ px$ and $B_y=237.8 \ px + 20 \ px=258 \ px$. The coordinates where the second line ends is $(87, 258)$.


b) Now, let the arrow connecting the lower right end of the first line to the lower right end of the second line be $\vec{C}$. Such that by looking at our diagram in Figure 3, we have a vector addition of $\vec{B}=\vec{A}+\vec{C}$. Re-arranging it, we have $\vec{C}=\vec{B}-\vec{A}$. Solving for the components of $\vec{C}$
$C_x=B_x-A_x=77.3 \ px-200 \ px=-122.7 \ px$
$C_y=B_y-A_y=237.8 \ px-180 \ px=57.8 \ px$
Solving for the magnitude and direction,
$C=\sqrt{(C_x)^2+(C_y)^2}=136 \ px$
$\theta=arctan \ (\frac{C_y}{C_x})=-25.2^o$ measured clockwise from the -$x$-axis. Or $25.2^o$ north of west. We can use the components of $\vec{C}$ as our guide that this vector is in the second quadrant of an xy-plane.

Figure 3