diff options
author | Karl Berry <karl@freefriends.org> | 2021-02-25 19:22:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-02-25 19:22:25 +0000 |
commit | ad547a6b5986815fda458221149728d9d9ab1d87 (patch) | |
tree | 16296910eb3eca724371474ea9aea3994dc69614 /Build/source/utils/asymptote/examples/triads.asy | |
parent | 947b43de3dd21d58ccc2ffadefc4441ea1c2a813 (diff) |
restore Build,TODO from r57911
git-svn-id: svn://tug.org/texlive/trunk@57915 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/examples/triads.asy')
-rw-r--r-- | Build/source/utils/asymptote/examples/triads.asy | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/Build/source/utils/asymptote/examples/triads.asy b/Build/source/utils/asymptote/examples/triads.asy new file mode 100644 index 00000000000..6cecc55fa46 --- /dev/null +++ b/Build/source/utils/asymptote/examples/triads.asy @@ -0,0 +1,54 @@ +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"); + +erase(); |