diff options
author | Karl Berry <karl@freefriends.org> | 2023-10-08 20:54:09 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-10-08 20:54:09 +0000 |
commit | 9b067c32f00b5af2f991959b6109a6ffc7d54cf9 (patch) | |
tree | e71c654d5400d5fd452677a96e747a9246b6cc3f /Master/texmf-dist/metapost/profcollege | |
parent | 2be401bc4af1f58f574a4194a3be45ab361ad60d (diff) |
profcollege (8oct23)
git-svn-id: svn://tug.org/texlive/trunk@68481 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/metapost/profcollege')
-rw-r--r-- | Master/texmf-dist/metapost/profcollege/PfCAllumettes.mp | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/Master/texmf-dist/metapost/profcollege/PfCAllumettes.mp b/Master/texmf-dist/metapost/profcollege/PfCAllumettes.mp new file mode 100644 index 00000000000..3ce248b99f6 --- /dev/null +++ b/Master/texmf-dist/metapost/profcollege/PfCAllumettes.mp @@ -0,0 +1,77 @@ +numeric longallu,epallu; +longallu=41.5mm; +epallu=2mm; +ecartpoint=epallu-0.1mm; + +color BurlyWood,PfCSoufre; +BurlyWood=(222,184,135)/256; +PfCSoufre=red; + +vardef Allu(expr dep,arr)= + save Retour; + picture Retour; + Retour=image( + pair depa,arra; + depa=dep+ecartpoint*unitvector(arr-dep); + arra=arr+ecartpoint*unitvector(dep-arr); + pair corps[]; + corps[1]-depa=0.5*epallu*unitvector(rotation(arr,dep,-90)-dep); + corps[4]=symetrie(corps[1],dep,arr); + corps2=corps1+0.975*(arra-depa); + corps3-corps2=corps4-corps1; + path Corps; + Corps=polygone(corps1,corps2,corps3,corps4); + fill Corps withcolor if print: white else:BurlyWood fi; + trace Corps withcolor 0.5[black,if print: white else:BurlyWood fi]; + pair cera,cerb,cerc; + cera=pointarc(cercles((0,0),1.5epallu),125); + cerb=pointarc(cercles((0,0),1.5epallu),235); + cerc=pointarc(cercles((0,0),1.5epallu),0); + path bout; + bout=arccercle(cerb,cerc,(0,0))--arccercle(cerc,cera,(0,0))--cycle; + fill (rotation(bout yscaled 0.385 xscaled 0.8,(0,0),angle(arra-depa)) shifted (arra+1.0*ecartpoint*unitvector(dep-arr))) withcolor if print:0.7white else: PfCSoufre fi; + draw (rotation(bout yscaled 0.385 xscaled 0.8,(0,0),angle(arra-depa)) shifted (arra+1.0*ecartpoint*unitvector(dep-arr))) withcolor 0.5[black,if print: 0.7white else: PfCSoufre fi]; + ); + Retour +enddef; + +vardef OldAllu(expr dep,arr)= + save Retour; + picture Retour; + Retour=image( + pair depa,arra; + depa=dep+ecartpoint*unitvector(arr-dep); + arra=arr+ecartpoint*unitvector(dep-arr); + pair corps[]; + corps[1]-depa=0.5*epallu*unitvector(rotation(arr,dep,-90)-dep); + corps[4]=symetrie(corps[1],dep,arr); + corps2=corps1+0.975*(arra-depa); + corps3-corps2=corps4-corps1; + path Corps; + Corps=polygone(corps1,corps2,corps3,corps4); +% fill Corps withcolor if print: white else:BurlyWood fi; +% trace Corps withcolor 0.5[black,if print: white else:BurlyWood fi] dashed evenly; + trace Corps dashed evenly; + pair cera,cerb,cerc; + cera=pointarc(cercles((0,0),1.5epallu),125); + cerb=pointarc(cercles((0,0),1.5epallu),235); + cerc=pointarc(cercles((0,0),1.5epallu),0); + path bout; + bout=arccercle(cerb,cerc,(0,0))--arccercle(cerc,cera,(0,0))--cycle; + fill (rotation(bout yscaled 0.385 xscaled 0.8,(0,0),angle(arra-depa)) shifted (arra+0.75*ecartpoint*unitvector(dep-arr))) withcolor white; + draw (rotation(bout yscaled 0.385 xscaled 0.8,(0,0),angle(arra-depa)) shifted (arra+0.75*ecartpoint*unitvector(dep-arr)));% withcolor 0.5[black,if print: 0.7white else: PfCSoufre fi]; + ); + Retour +enddef; + +u:=longallu+epallu; + +vardef DefinirUnite(expr pfcechelle)= + longallu:=longallu*pfcechelle; + epallu:=epallu*pfcechelle; + ecartpoint:=ecartpoint*pfcechelle; + u:=longallu+epallu; +enddef; + +endinput; + |