Struggling often with Trigonometry I would like to have some code to generate this Unit Circle Trigonometry. Would be of great help when I need to transform some data :
Answer
There are a couple tricky points here. Here's a start, which I imagine you can finish.
markings[t_] := Module[{o={0,0},p={Cos[t],Sin[t]},
t2=Together[t],tFormat, rot},
tFormat = If[Denominator[t2]=!=1,
Row[{Numerator[t2],"/",Denominator[t2]}]];
rot = If[TrueQ[Pi/2
{{Opacity[0.3],Line[{o,p}]},
Rotate[Inset[Style[
Row[{t(180/Pi)Degree, " = ",tFormat}],
FontSize->18], p/2],rot],
Text[{Cos[t],Sin[t]},p,-1.3p]}
];
Graphics[{
Circle[{0,0},1],
Table[markings[t],{t,{Pi/6,Pi/4,2Pi/3}}]
}]
In addition to finishing it, logical enhancements would include: Making the Circle thicker, adjusting the size and/or format of the point labels, adding Points on the boundary, and/or making it dynamic.
Have fun!
Comments
Post a Comment