Reference Angle

advertisement
> restart:
> with(plots):
This will animated the reference angle for an angle rotated counterclockwise.
Enter the angle in degrees:
> a := 135;
Calculation of angle in radians:
> ar := a*Pi/180;
The number of division for the animation:
> d := 24;
The last value of n in order to make the angle. NOTE: You might have to change the value of d
above so that m is an integer and/or a larger value:
> m := a*d/180;
What quadrant is the angle in?
> q := 2;
> ha := piecewise(q=1 or q=4, 0, Pi);
> ptermsideangrot := n -> plot( [ [0,0],
[10*cos(n*Pi/d),10*sin(n*Pi/d)] ], x=-12..12, y=-12..12,
thickness=3, scaling=constrained);
> ptermsideang := n -> plot( [ [0,0],
[10*cos(m*Pi/d),10*sin(m*Pi/d)] ], x=-12..12, y=-12..12,
thickness=3, scaling=constrained);
> parc := n -> plot( [2*cos(t), 2*sin(t), t=-0.0001..n*Pi/d],
x=-12..12, y=-12..12, color=black, scaling=constrained);
> pwarc := n -> piecewise(n>=0 and n<=m, parc(n), parc(m));
> initside := plot( [ [0,0], [10,0] ], x=-12..12, y=-12..12,
thickness=3, scaling=constrained );
> pwang := n -> piecewise(n>=0 and n<=m, ptermsideangrot(n),
ptermsideang(n));
> ppt := n -> plot( [ [0,0] ], x=-12..12, y=-12..12,
style=point);
> ptrtermside := n -> plot( [ [0,0], [10*(n-m)*cos(ar)/m, 10*(nm)*sin(ar)/m] ], x=-12..12, y=-12..12, thickness=2, color=blue,
scaling=constrained );
> pwptrtermside := n -> piecewise(n>=0 and n<m, ppt(n), n>=m and
n<2*m, ptrtermside(n), ptrtermside(2*m));
> ptrxax := n -> plot( [ [0,0], [10*cos(ha)*(n-2*m)/m,0] ], x=12..12, y=-12..12, thickness=2, color=blue, scaling=constrained
);
> pwptrxax := n -> piecewise(n>=0 and n<2*m, ppt(n), n>=2*m and
n<3*m, ptrxax(n), ptrxax(3*m));
> praarc1 := n -> plot( [6*cos(t),6*sin(t),t=0..ar], x=-12..12,
y=-12..12, color=blue, thickness=2, scaling=constrained,
title="The Blue Angle Is Reference Angle for the Given Angle in
the First Quadrant");
> praarc2 := n -> plot( [6*cos(t),6*sin(t),t=ar..Pi], x=-12..12,
y=-12..12, color=blue, thickness=2, scaling=constrained,
title="The Blue Angle Is Reference Angle for the Given Angle in
the Second Quadrant");
> praarc3 := n -> plot( [6*cos(t),6*sin(t),t=Pi..ar],
color=blue, thickness=2, scaling=constrained, title="The Blue
Angle Is Reference Angle for the Given Angle in the Third
Quadrant");
> praarc4 := n -> plot( [6*cos(t),6*sin(t),t=ar..2*Pi], x=12..12, y=-12..12, color=blue, scaling=constrained, thickness=2,
title="The Blue Angle Is Reference Angle for the Given Angle in
the Fourth Quadrant");
> praarc := n -> piecewise(q=1, praarc1(n), q=2, praarc2(n),
q=3, praarc3(n), q=4, praarc4(n));
> pwraarc := n -> piecewise(n>=0 and n<3*m+2, ppt(n),
praarc(n));
> pharc23 := n -> plot( [4*cos(t),4*sin(t),t=0..Pi], x=-12..12,
y=-12..12, color=black, scaling=constrained);
> pharc := n -> piecewise(q=1, ppt(n), q=2 or q=3, pharc23(n),
q=4, ppt(n));
> pwharc := n -> piecewise(n>=0 and n<3*m+4, ppt(n), pharc(n));
> pangle := n -> display( initside, pwang(n), pwarc(n),
pwptrtermside(n), pwptrxax(n), pwraarc(n), pwharc(n) );
> display( seq( pangle(n), n=0..3*m+52 ), insequence=true,
scaling=constrained);
>
Download