diff options
author | Karl Berry <karl@freefriends.org> | 2013-04-07 18:26:53 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-04-07 18:26:53 +0000 |
commit | b04c2e1a42573e9735547702356c7b9a769a6855 (patch) | |
tree | c0753443f39500a062d7698fe6b94359c813f871 /Master/texmf-dist/doc/asymptote/examples/triads.asy | |
parent | fb0bf13304a356f197bfc1add17f98c07e96f17b (diff) |
texmf -> texmf-dist: doc
git-svn-id: svn://tug.org/texlive/trunk@29714 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/asymptote/examples/triads.asy')
-rw-r--r-- | Master/texmf-dist/doc/asymptote/examples/triads.asy | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/asymptote/examples/triads.asy b/Master/texmf-dist/doc/asymptote/examples/triads.asy new file mode 100644 index 00000000000..73088197e25 --- /dev/null +++ b/Master/texmf-dist/doc/asymptote/examples/triads.asy @@ -0,0 +1,52 @@ +import graph; + +path p=(10,75)..(15,85)..(20,90)..(35,85)..(40,79)--(78,30)..(85,15)..(87,5); + +pair l=point(p,3.5); +pair m=point(p,4.5); +pair s=point(p,4.9); + +pen c=linewidth(1.5); +pair o=(m.x,0.5(m.x+l.y)); + +pen d=c+darkgreen; + +void drawarrow(string s="", pair p, pair q, side side=RightSide, + bool upscale=false, pen c) +{ + path g=p{dir(-5)}..{dir(-85)}q; + if(upscale) g=reverse(g); + draw(s,g,side,c,Arrow(Fill,0.65)); +} + +void spectrum(pair l,pair m, pair s) { + draw(p,c); + + d += 4.0; + dot("$p$",l,SW,d); + dot("$q$",m,SW,d); + dot("$k$",s,SW,d); + + xaxis("$k$",0); + yaxis("$E(k)$",0); +} + +drawarrow("$T_p$",l,m,true,blue); +drawarrow("$T_k$",m,s,LeftSide,red); +spectrum(l,m,s); +shipout("triadpqk"); + +erase(); + +drawarrow("$-T_p$",l,m,LeftSide,red); +drawarrow("$-T_q$",m,s,true,blue); +spectrum(l,s,m); +shipout("triadpkq"); + +erase(); + +drawarrow("$T_k$",l,m,true,blue); +drawarrow("$T_q$",m,s,LeftSide,red); +spectrum(m,s,l); + +shipout("triadkpq"); |