summaryrefslogtreecommitdiff
path: root/Master/texmf/doc/asymptote/examples/cosaddition.asy
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf/doc/asymptote/examples/cosaddition.asy')
-rw-r--r--Master/texmf/doc/asymptote/examples/cosaddition.asy26
1 files changed, 26 insertions, 0 deletions
diff --git a/Master/texmf/doc/asymptote/examples/cosaddition.asy b/Master/texmf/doc/asymptote/examples/cosaddition.asy
new file mode 100644
index 00000000000..f6ce8de62a4
--- /dev/null
+++ b/Master/texmf/doc/asymptote/examples/cosaddition.asy
@@ -0,0 +1,26 @@
+size(0,200);
+import geometry;
+
+real A=130;
+real B=40;
+
+pair O=(0,0);
+pair R=(1,0);
+pair P=dir(A);
+pair Q=dir(B);
+
+draw(circle(O,1.0));
+draw(Q--O--P);
+draw(P--Q,red);
+draw(O--Q--R--cycle);
+
+draw("$A$",arc(R,O,P,0.3),blue,Arrow,PenMargin);
+draw("$B$",arc(R,O,Q,0.6),blue,Arrow,PenMargin);
+pair S=(Cos(B),0);
+draw(Q--S,blue);
+perpendicular(S,NE,blue);
+
+dot(O);
+dot("$R=(1,0)$",R);
+dot("$P=(\cos A,\sin A)$",P,dir(O--P)+W);
+dot("$Q=(\cos B,\sin B)$",Q,dir(O--Q));