summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/FieldLines.m4
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-03-11 21:11:43 +0000
committerKarl Berry <karl@freefriends.org>2023-03-11 21:11:43 +0000
commit6bc45f3087df0ce19bdf3c57a0aec55944ec40ed (patch)
tree3faac3b12b92fc4ba09b62c0472a9b3654dada6a /Master/texmf-dist/doc/latex/circuit-macros/examples/extras/FieldLines.m4
parent86d58778de06c53c2e0b20f25556b96619a2dc42 (diff)
circuit-macros (11mar23)%
git-svn-id: svn://tug.org/texlive/trunk@66549 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/circuit-macros/examples/extras/FieldLines.m4')
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/extras/FieldLines.m424
1 files changed, 24 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/FieldLines.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/FieldLines.m4
new file mode 100644
index 00000000000..0832e20d92a
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/FieldLines.m4
@@ -0,0 +1,24 @@
+.PS
+# https://tex.stackexchange.com/questions/593866/magnetic-field-with-2-coils
+cct_init(SIdefaults)
+
+ setdir_(R)
+ W1: winding(,20,5,8,10)
+ line dn_ 10 from W1.T1; dot(,,1)
+ line dn_ 10 from W1.T2; dot(,,1)
+ W2: winding(,20,5,8,10) with .w_ at W1.e_+vec_(10,0)
+ line dn_ 10 from W2.T1; dot(,,1)
+ line dn_ 10 from W2.T2; dot(,,1)
+ for i=2 to -2 by -1 do {
+ spline 0.55 \
+ from W2.e_+vec_(30,10/4*i*3) \
+ to W2.e_+vec_(25,10/4*i*2) \
+ then to W2.e_+vec_(0,10/4*i) \
+ then to W1.w_+vec_(0,10/4*i) \
+ then to W1.w_+vec_(-25,10/4*i*2) \
+ then to W1.w_+vec_(-30,10/4*i*3)
+ arrow wid 2 ht 2 dn_ i*0.66 rt_ 2 at W1.w_+vec_(-25,10/4*i*2.35)
+ arrow wid 2 ht 2 up__ i*0.66 rt_ 2 at W2.e_+vec_(25,10/4*i*2.35)
+ }
+
+.PE