## Official Asymptote example – controlsystem

Category: Asymptote,Official Gallery One-PagerPh. Ivaldi @ 0 h 57 min

 (Compiled with Asymptote version 2.14svn-r5318)
/* This code comes from The Official Asymptote Gallery */

size(0,4cm);
import flowchart;

block delay=roundrectangle("$e^{-sT_t}$",(0.33,0));
block system=roundrectangle("$\frac{s+3}{s^2+0.3s+1}$",(0.6,0));
block controller=roundrectangle("$0.06\left( 1 + \frac{1}{s}\right)$",
(0.45,-0.25));
block sum1=circle("",(0.15,0),mindiameter=0.3cm);
block junction1=circle("",(0.75,0),fillpen=currentpen);

draw(delay);
draw(system);
draw(controller);
draw(sum1);
draw(junction1);

add(new void(picture pic, transform t) {
blockconnector operator --=blockconnector(pic,t);

block(0,0)--Label("$u$",align=N)--Arrow--sum1--Arrow--delay--Arrow--
system--junction1--Label("$y$",align=N)--Arrow--block(1,0);

junction1--Down--Left--Arrow--controller--Left--Up--
Label("$-$",position=3,align=ESE)--Arrow--sum1;
});



Étiquettes :

## Official Asymptote example – flowchartdemo

Category: Asymptote,Official Gallery One-PagerPh. Ivaldi @ 11 h 57 min

 (Compiled with Asymptote version 2.14svn-r5318)
/* This code comes from The Official Asymptote Gallery */

size(0,300);

import flowchart;

block block1=rectangle(Label("Example",magenta),
pack(Label("Start:",heavygreen),"",Label("$A:=0$",blue),
"$B:=1$"),(-0.5,3),palegreen,paleblue,red);
block block2=diamond(Label("Choice?",blue),(0,2),palegreen,red);
block block3=roundrectangle("Do something",(-1,1));
block block4=bevel("Don't do something",(1,1));
block block5=circle("End",(0,0));

draw(block1);
draw(block2);
draw(block3);
draw(block4);
draw(block5);

add(new void(picture pic, transform t) {
blockconnector operator --=blockconnector(pic,t);
//    draw(pic,block1.right(t)--block2.top(t));
block1--Right--Down--Arrow--block2;
block2--Label("Yes",0.5,NW)--Left--Down--Arrow--block3;
block2--Right--Label("No",0.5,NE)--Down--Arrow--block4;
block4--Down--Left--Arrow--block5;
block3--Down--Right--Arrow--block5;
});



Étiquettes :