A good answer might be:
The answers are easy to figure out since multiplication by zero results in zero (at one end) and the (2*PI) in the numberator cancels the (2*PI) in the denominator (at the other end.) | |||||||
Linear EquationSince the equation is linear, all the points in between will also be correct. Here is the same thing for the integer Y that is needed to graph the function. Recall that the range of sin(x) ( -1 to +1 ) is to be represented in an applet with a height of 400 pixels.
Remember that Y=0 for applets corresponds to the very top row and that Y=399 will be the bottom row. Do this by using another linear equation: Y = -y * 399/2 + 399/2 Using these two scaling equations, the scheme for drawing the graph is:
This code is not very pretty, I'll admit. However, it is fairly typical code for computer graphics and is well worth the time you spend with it. | |||||||
QUESTION 11:Why do the statements say 399.0/2.0 instead of 399/2 ? Click Here after you have answered the question |