Solved

# how can i make plot values with this function

Posted on 2003-02-23

ok, not sure where to start with this!

i am making a prog which will produce an oval of aurora activity, the example below will produce an equatorward oval (the outside of the oval) once i have worked out how to do this, the poleward(inside) oval should be easy enough to achieve

i have phi which is 0 to 360 degrees

i have theta which co latitude, or -90 latitude

i am also using cos, but if im correct, flash uses radians, i need it to be in degrees.

i will be having what are known as Q coefficients going into my equation, these represent angles, they are numbered a1-a7, there are 6 sets,Q1-Q6

this is the equation i have so far, the syntax is right, i just dont know how to produce 360 plot values

function plotValues() {

(theta)-90degrees = a1 + a2 * cos(phi + a3)

+ a4 * cos((2 * phi) + (2 * a5))

+ a6 * cos((3 * phi) + (3 * a7));

an example of it working would be:

when phi=10

and Q=1

a1= 15.22,a2=2.70,a3=3.32,a4=-0.67,a5=1.15,a6=0.49,a7=1.00

90- 15.22 + 2.70 cos(10 + 3.32)

+ -0.67 cos(2*10 + 2*1.15)

+ 0.49 cos(3*10 + 3* 1.00)

which will equal 72.36 degrees, 360 plot values should give me an oval shape

i know i make a for loop for phi

so for (var phi=0;phi<360;phi++)

not sure where to go from here though

i have a fla file for someone whos not sure whats going on