summaryrefslogtreecommitdiff
path: root/graphics/circuit_macros/examples/Geometry.m4
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/circuit_macros/examples/Geometry.m4')
-rw-r--r--graphics/circuit_macros/examples/Geometry.m430
1 files changed, 27 insertions, 3 deletions
diff --git a/graphics/circuit_macros/examples/Geometry.m4 b/graphics/circuit_macros/examples/Geometry.m4
index 0cbf4bb499..771f4a6b7c 100644
--- a/graphics/circuit_macros/examples/Geometry.m4
+++ b/graphics/circuit_macros/examples/Geometry.m4
@@ -10,7 +10,7 @@ Fig1: [ ls = 2/3 # local scale
BC: line from B to C
CA: line from C to A
- PerpTo(A,BC,L); "L" at L below
+ perpto(A,BC,L); "L" at L below
AL: line from A to L; RightAngle(A,L,C)
angleLAC = atan2(C.x-L.x,A.y-L.y)
@@ -18,10 +18,10 @@ Fig1: [ ls = 2/3 # local scale
AW: line from A to Intersect_(S,BC)
W: Here; "W" at W below rjust
- PerpTo(C,AB,N); "N" at N above rjust
+ perpto(C,AB,N); "N" at N above rjust
CN: line from C to N; RightAngle(C,N,B)
- PerpTo(B,CA,M); "M" at M above
+ perpto(B,CA,M); "M" at M above
CM: line from B to M; RightAngle(B,M,C)
H: Intersect_(CN,AL); "H" at H +(4bp__,10bp__)
@@ -67,4 +67,28 @@ Fig2: [ ls = 3/4 # local scale
ArcAngle(R,Q,N,0.5); "$\alpha$" at last arc.start+(8bp__,-5bp__)
] with .w at Fig1.e+(-0.4,0)
+Fig3: [
+# https://tex.stackexchange.com/questions/609452/help-drawing-a-more-sophisticated-right-triangle-with-tikz-or-something-else
+gen_init
+
+define(`textsize',`\Large')
+ unit = 0.6
+ C: Here; { "textsize C" at C rjust below }
+ B: C+(4*unit,0); { "textsize B" at B ljust below }
+ A: C+(0,3*unit); { "textsize A" at A rjust above }
+ H: PerpTo(C,A,B); { "textsize H" at H ljust above }
+ line from C to H then to B then to C shaded rgbstring(0.5,0.8,0.9)
+# line from C to H then to B then to C shaded "CornflowerBlue"
+ line from C to H then to A then to C shaded rgbstring(0.8,0.9,0.7)
+# line from C to H then to A then to C shaded "SpringGreen"
+ ArcAngle(C,A,B,unit*0.4)
+ ArcAngle(C,A,B,unit*0.5)
+ ArcAngle(A,B,C,unit*0.5,,"textsize $\theta$" rjust)
+ ArcAngle(B,C,H,unit*0.5); {"textsize $\theta$" at C+(unit*0.3,unit*0.17) }
+ ArcAngle(B,C,A,unit*0.6)
+ RightAngle(B,C,A,unit*0.17)
+ RightAngle(C,H,A,unit*0.17)
+
+ ] with .nw at Fig1.sw+(0.2,-0.3)
+
.PE