Tangens til en vinkel er andenkoordinaten for skæringspunktet mellem en linje gennem origo og vinklens retningspunkt, P, og tangenten til enhedscirklen gennem (1,0). På figuren kan du flytte punktet P og se, hvordan tangens dannes. Det røde linjestykke hhv. buestykke er x, de blå linjestykker er tan x.
Figure figure1 = Position [0,0] Size[x/4,y] Origin[x/8,y/2] Unit x/12 Color "white";
Axes axes1 = Color "black";
Grid grid1 = Color "green";
//Units units1 = Color "black";
Circle unitcircle = Center [0,0] Radius 1 Size 1 Color "black";
Point P = [1,0] Slider unitcircle Size 2.5 Color "red";
Label P_label = "P" At P Offset [10,-10] Color "black";
Point C = [0,0] Size 2.5 Color "black";
Variable x = angle( P );
Circle arc = Center [0,0] Radius 1 From 0 To x Size 2.5 Color "red";
Line secant = Start [1,0] Dir [0,tan(x)] Size 2.5 Color "blue";
Line l0 = Start [1,0] Dir [0,1] Infinite Size 1 Color "black";
Line l1 = Start [0,0] Dir [1,tan(x)] Size 1 Color "black";
Line l2 = Start [0,0] Dir P Size 1 Color "black";
Figure figure2 = Position [x*5/18,0] Size[x*13/18,y] Origin[x*13/36,y/2] Unit x/12 Color "white";
Axes axes2 = Color "black";
Grid grid2 = Color "blue";
Units units2 = Color "black";
Line x_coor = Start [0,0] Dir [x,0] Size 2.5 Color "red";
Line l3 = Start [x,0] Dir [0,tan(x)] Size 2.5 Color "blue";
ParametricCurve tangens = [t, tan(t)] From 0 To x Size 1 Color "black";
Point Q = [x,tan(x)] Size 2.5 Color "black";
Label Q_label = "(x, tan x)" At Q Offset [10,-10] Color "black" Style "font-family:MJX_MATH;font-size:120%;";