Add a PyMOL builder to SCons and generalize PYMOL_PATH setup.
[thesis.git] / src / figures / schematic / afm.asy
1 // AFM operating principle graphic
2
3 //size(x=9cm,keepAspect=true);
4
5 import base_afm; // for Cantilever, Substrate, ...
6
7 defaultpen(fontsize(size=10pt, lineskip=10pt));
8
9 Cantilever c = Cantilever();
10 // position base so tip touches substrate when bent
11 c.set_tip_for_dx(8pt);
12 c.align_tip((0,0));
13 // unbend the tip and draw it in grey
14 c.set_tip_for_dx(0);
15 pair unbent_tip = c.tip;
16 filldraw(c.tip_guide(), fillpen=grey, grey);
17 draw(c.arm_guide(), grey);
18 // rebend the tip and draw it in black
19 c.set_tip_for_dx(8pt);
20 filldraw(c.tip_guide(), fillpen=black);
21 draw(c.arm_guide(), black);
22 label("Cantilever", c.base-(0,14pt), SW);
23
24 Substrate s = Substrate();
25 s.draw();
26
27 Photodiode p = Photodiode(center=(-40pt, 40pt));
28 p.draw();
29 label("Photodiode", p.center+(0,p.radius), N);
30
31 Laser s = Laser(start=(-5pt,40pt), dir=S, cantilever=c, photodiode=p);
32 s.draw();
33 label("Laser", s.start, N);