hi
is there any particular reason why you you use theeta increments of 30 degrees? i also wondered about situations where you are given a specific range value. finally, how do you determine the range
Remember your special triangles from geometry; the ratio of the sides of your 30-60-90 triangle, 1-2-square root of 3? That is why the increment goes in 30 degrees; it is easy to learn the cosine and sine.
The range is just the greatest and least value of "y". Since the sine and cosine functions are cyclical (a wave), it is usually easy to find your range within one cycle (say zero to pi).