diff options
Diffstat (limited to 'Master/texmf-dist/doc/asymptote/examples/thermodynamics.asy')
-rw-r--r-- | Master/texmf-dist/doc/asymptote/examples/thermodynamics.asy | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/Master/texmf-dist/doc/asymptote/examples/thermodynamics.asy b/Master/texmf-dist/doc/asymptote/examples/thermodynamics.asy index cfcc3d0e98e..e0965028975 100644 --- a/Master/texmf-dist/doc/asymptote/examples/thermodynamics.asy +++ b/Master/texmf-dist/doc/asymptote/examples/thermodynamics.asy @@ -14,7 +14,7 @@ picture CreateKOOS(real Scale, string legend) // draw labeled coor draw(ReturnPic, ((0,-S)--(0,S)), bar = EndArrow); // y axis label(ReturnPic, "$\varepsilon$", (S,0), SW); // x axis label label(ReturnPic, "$\sigma$", (0,S), SW); // y axis label - label(ReturnPic, legend, (0.7S, -S), NW); // add label 'legend' + label(ReturnPic, legend, (0.7S, -S), NW); // add label 'legend' return ReturnPic; // return picture } @@ -32,69 +32,69 @@ picture T[]; // vector of all four diagrams real inc = 2.8; // increment-offset for combining pictures //////////////////////////////////////// 1st diagram -T[1] = CreateKOOS(S, "$T_1$"); // initialise T[1] as empty diagram with label $T_1$ -graph = A; // # pointwise definition of current path 'graph' -graph = graph -- (A.x + grad*1.6, A.y + 1.6); // # -graph = graph -- (E.x - grad*0.4, E.y - 0.4); // # +T[1] = CreateKOOS(S, "$T_1$"); // initialise T[1] as empty diagram with label $T_1$ +graph = A; // # pointwise definition of current path 'graph' +graph = graph -- (A.x + grad*1.6, A.y + 1.6); // # +graph = graph -- (E.x - grad*0.4, E.y - 0.4); // # graph = graph -- E; // # -graph = roundedpath(graph, radius, S); // round edges of 'graph' using roundedpath() in roundedpath.asy -ActPen = rgb(0,0,0.6) + linewidth(lw); // define pen for drawing in 1st diagram -draw(T[1], graph, ActPen); // draw 'graph' with 'ActPen' into 'T[1]' (1st hysteresis branch) -draw(T[1], rotate(180,(0,0))*graph, ActPen); // draw rotated 'graph' (2nd hysteresis branch) +graph = roundedpath(graph, radius, S); // round edges of 'graph' using roundedpath() in roundedpath.asy +ActPen = rgb(0,0,0.6) + linewidth(lw); // define pen for drawing in 1st diagram +draw(T[1], graph, ActPen); // draw 'graph' with 'ActPen' into 'T[1]' (1st hysteresis branch) +draw(T[1], rotate(180,(0,0))*graph, ActPen); // draw rotated 'graph' (2nd hysteresis branch) graph = (0,0) -- (grad*0.6, 0.6) -- ( (grad*0.6, 0.6) + (0.1, 0) ); // define branch from origin to hysteresis -graph = roundedpath(graph, radius, S); // round this path -draw(T[1], graph, ActPen); // draw this path into 'T[1]' +graph = roundedpath(graph, radius, S); // round this path +draw(T[1], graph, ActPen); // draw this path into 'T[1]' //////////////////////////////////////// 2nd diagram -T[2] = CreateKOOS(S, "$T_2$"); // initialise T[2] as empty diagram with label $T_2$ -graph = A; // # pointwise definition of current path 'graph' -graph = graph -- (A.x + grad*1.3, A.y + 1.3); // # -graph = graph -- (E.x - grad*0.7 , E.y - 0.7); // # +T[2] = CreateKOOS(S, "$T_2$"); // initialise T[2] as empty diagram with label $T_2$ +graph = A; // # pointwise definition of current path 'graph' +graph = graph -- (A.x + grad*1.3, A.y + 1.3); // # +graph = graph -- (E.x - grad*0.7 , E.y - 0.7); // # graph = graph -- E; // # - -graph = roundedpath(graph, radius, S); // round edges of 'graph' using roundedpath() in roundedpath.asy -ActPen = rgb(0.2,0,0.4) + linewidth(lw); // define pen for drawing in 2nd diagram -draw(T[2], graph, ActPen); // draw 'graph' with 'ActPen' into 'T[2]' (1st hysteresis branch) -draw(T[2], rotate(180,(0,0))*graph, ActPen); // draw rotated 'graph' (2nd hysteresis branch) + +graph = roundedpath(graph, radius, S); // round edges of 'graph' using roundedpath() in roundedpath.asy +ActPen = rgb(0.2,0,0.4) + linewidth(lw); // define pen for drawing in 2nd diagram +draw(T[2], graph, ActPen); // draw 'graph' with 'ActPen' into 'T[2]' (1st hysteresis branch) +draw(T[2], rotate(180,(0,0))*graph, ActPen); // draw rotated 'graph' (2nd hysteresis branch) graph = (0,0) -- (grad*0.3, 0.3) -- ( (grad*0.3, 0.3) + (0.1, 0) ); // define branch from origin to hysteresis -graph = roundedpath(graph, radius, S); // round this path -draw(T[2], graph, ActPen); // draw this path into 'T[2]' +graph = roundedpath(graph, radius, S); // round this path +draw(T[2], graph, ActPen); // draw this path into 'T[2]' //////////////////////////////////////// 3rd diagram -T[3] = CreateKOOS(S, "$T_3$"); // initialise T[3] as empty diagram with label $T_3$ -graph = A; // # pointwise definition of current path 'graph' -graph = graph -- (A.x + grad*0.7, A.y + 0.7); // # -graph = graph -- ( - grad*0.3 , - 0.3); // # -graph = graph -- (0,0); // # -graph = graph -- (grad*0.6, 0.6); // # -graph = graph -- (E.x - grad*0.4, E.y - 0.4); // # -graph = graph -- E; // # - -graph = roundedpath(graph, radius, S); // round edges of 'graph' using roundedpath() in roundedpath.asy -ActPen = rgb(0.6,0,0.2) + linewidth(lw); // define pen for drawing in 3rd diagram -draw(T[3], graph, ActPen); // draw 'graph' with 'ActPen' into 'T[3]' (1st hysteresis branch) -draw(T[3], rotate(180,(0,0))*graph, ActPen); // draw rotated 'graph' (2nd hysteresis branch) +T[3] = CreateKOOS(S, "$T_3$"); // initialise T[3] as empty diagram with label $T_3$ +graph = A; // # pointwise definition of current path 'graph' +graph = graph -- (A.x + grad*0.7, A.y + 0.7); // # +graph = graph -- ( - grad*0.3 , - 0.3); // # +graph = graph -- (0,0); // # +graph = graph -- (grad*0.6, 0.6); // # +graph = graph -- (E.x - grad*0.4, E.y - 0.4); // # +graph = graph -- E; // # + +graph = roundedpath(graph, radius, S); // round edges of 'graph' using roundedpath() in roundedpath.asy +ActPen = rgb(0.6,0,0.2) + linewidth(lw); // define pen for drawing in 3rd diagram +draw(T[3], graph, ActPen); // draw 'graph' with 'ActPen' into 'T[3]' (1st hysteresis branch) +draw(T[3], rotate(180,(0,0))*graph, ActPen); // draw rotated 'graph' (2nd hysteresis branch) //////////////////////////////////////// 4th diagram -T[4] = CreateKOOS(S, "$T_4$"); // initialise T[4] as empty diagram with label $T_4$ -graph = A; // # pointwise definition of current path 'graph' -graph = graph -- (A.x + grad*0.4, A.y + 0.4); // # -graph = graph -- ( - grad*0.6 , - 0.6); // # -graph = graph -- (0,0); // # -graph = graph -- (grad*0.9, 0.9); // # -graph = graph -- (E.x - grad*0.1, E.y - 0.1); // # -graph = graph -- E; // # - -graph = roundedpath(graph, radius, S); // round edges of 'graph' using roundedpath() in roundedpath.asy -ActPen = rgb(0.6,0,0) + linewidth(lw); // define pen for drawing in 4th diagram -draw(T[4], graph, ActPen); // draw 'graph' with 'ActPen' into 'T[4]' (1st hysteresis branch) -draw(T[4], rotate(180,(0,0))*graph, ActPen); // draw rotated 'graph' (3nd hysteresis branch) +T[4] = CreateKOOS(S, "$T_4$"); // initialise T[4] as empty diagram with label $T_4$ +graph = A; // # pointwise definition of current path 'graph' +graph = graph -- (A.x + grad*0.4, A.y + 0.4); // # +graph = graph -- ( - grad*0.6 , - 0.6); // # +graph = graph -- (0,0); // # +graph = graph -- (grad*0.9, 0.9); // # +graph = graph -- (E.x - grad*0.1, E.y - 0.1); // # +graph = graph -- E; // # + +graph = roundedpath(graph, radius, S); // round edges of 'graph' using roundedpath() in roundedpath.asy +ActPen = rgb(0.6,0,0) + linewidth(lw); // define pen for drawing in 4th diagram +draw(T[4], graph, ActPen); // draw 'graph' with 'ActPen' into 'T[4]' (1st hysteresis branch) +draw(T[4], rotate(180,(0,0))*graph, ActPen); // draw rotated 'graph' (3nd hysteresis branch) // add some labels and black dots to the first two pictures @@ -126,6 +126,6 @@ ActPen = linewidth(1) + gray(0.5); // define draw(shift(( 1 - grad*0.55 + 0*inc)*S, 0.45*S)*mark, ActPen); // # draw all intersections draw(shift((-1 + grad*1.45 + 0*inc)*S, 0.45*S)*mark, ActPen); // # draw(shift(( 1 - grad*0.55 + 1*inc)*S, 0.45*S)*mark, ActPen); // # -draw(shift(( 1 - grad*0.55 + 2*inc)*S, 0.45*S)*mark, ActPen); // # -draw(shift(( grad*0.45 + 2*inc)*S, 0.45*S)*mark, ActPen); // # +draw(shift(( 1 - grad*0.55 + 2*inc)*S, 0.45*S)*mark, ActPen); // # +draw(shift(( grad*0.45 + 2*inc)*S, 0.45*S)*mark, ActPen); // # draw(shift(( grad*0.45 + 3*inc)*S, 0.45*S)*mark, ActPen); // # |