]> permondes.de Git - Analog_Engine.git/commitdiff
LACE: document re-structured, consistent syntax; Aplaca60 main
authorPermondes <machen@permondes.de>
Wed, 31 Dec 2025 09:09:21 +0000 (10:09 +0100)
committerPermondes <machen@permondes.de>
Wed, 31 Dec 2025 09:09:21 +0000 (10:09 +0100)
Examples: Speed of bullet when it reaches the ground
LACE: document re-structured, consistent syntax
Applications: alpaca60: Arneodo chaotic oscilator

Analog Engine Example Applications.odt
Language for Analog Computing Engines.odt
scripts/Bullet.LACE [new file with mode: 0644]
scripts/alpaca60 Arneodo.LACE [new file with mode: 0644]

index d26398f6050517b24bb8c60899af10cd6d60a901..ba5cfc21b3637e357c59377330c0942751722418 100644 (file)
Binary files a/Analog Engine Example Applications.odt and b/Analog Engine Example Applications.odt differ
index cad656a25de365ab8d52840f33338d002d67d726..9f42b04af33f0dc93677488c1657c7f39e5b38bd 100644 (file)
Binary files a/Language for Analog Computing Engines.odt and b/Language for Analog Computing Engines.odt differ
diff --git a/scripts/Bullet.LACE b/scripts/Bullet.LACE
new file mode 100644 (file)
index 0000000..f76932f
--- /dev/null
@@ -0,0 +1,27 @@
+# Bullet shot vertically up
+#
+# z'' = -g -af = -g -k*v^2
+#     with k = 1/m * 1/2 * A * c.w * rho 
+
+coefficient.1(-1) -> -g    # gravity
+coefficient.2 -> k         # coefficient of friction
+coefficient.3(+1) -> v0    # initial vertical speed
+
+iintegrate (-g, 10*: friction) -> -v
+  IC: v0
+iintegrate (-v) -> z
+
+invert -v -> v
+
+multiply (-v, -v) -> v^2
+cmultiply (k, v^2) -> kv^2 
+
+# make sure friction acts against the direction of propagation
+invert kv^2 -> -kv^2
+compare v -> friction 
+  GT0: -kv^2   # v > 0 => moving upwards
+  LT0:  kv^2   # v < 0 => moving downwards
+  
+output (v)        -> out.x
+Output (friction) -> out.y
+output (z)        -> out.z
diff --git a/scripts/alpaca60 Arneodo.LACE b/scripts/alpaca60 Arneodo.LACE
new file mode 100644 (file)
index 0000000..db46c99
--- /dev/null
@@ -0,0 +1,65 @@
+# Arneodo-Attractor (alpaca_60)
+# x' = y, x0 = 1
+# y' = z, y0 = 1
+# z' = a*x-b*y-z-c*x^3, z0=0
+# a=5,5; b=3,5; c=1
+#
+# SCALING
+# the problem is patched as designed, but x runs out of range
+# Trial: x = 5*xn (xn = new x), y = 10*yn, z = 15*zn
+#    5*xn' = 10*y                              => xn' = 2*y
+#    10*y' = 15*zn                             => y'  = 1,5*z
+#    15*zn' = a*5*xn-b*10*yn-15*zn-c*(5*xn)^3  => z' = a*5/15*xn-b*10/15*yn-15/15*zn-c*125/15*xn^3
+#
+#    xn' = d1*y
+#    yn' = e1*z
+#    zn' = a1*xn-b1*yn-zn-c1*xn^3
+#
+#    a1 = a*5/15 = 1,83
+#    b1 = b*10/15 = 2,33
+#    c1 = c*5^3/15 = 8,33
+#    d1 = 2
+#    e1 = 1,5
+#
+# in the following, the original terms are being used, 
+
+coefficient.1     -> a/10 # 0,183 -> better results with 0,154
+coefficient.2     -> b/10 # 0,233 
+coefficient.3     -> c/10 # 0,833 
+coefficient.4(+1) -> x0   # 0,200    
+coefficient.5(+1) -> y0   # 0,100 
+coefficient.6(+1) -> z0   # 0
+coefficient.7     -> d/10 # 0,200 
+coefficient.8     -> e/10 # 0,150 
+
+iintegrate 10*: x' -> -x
+  IC: x0
+iintegrate 10*: y' -> -y
+  IC: y0
+iintegrate z' -> -z
+  IC: z0
+  
+invert -x -> x
+
+invert -y -> y
+cmultiply y, d/10 -> d/10*y 
+assign d/10*y -> x'
+
+invert -z -> z
+cmultiply z, e/10 -> e/10*z 
+assign e/10*z -> y'
+
+cmultiply x, a/10 -> a/10*x
+cmultiply -y, b/10 -> -b/10*y
+
+multiply -x, -x -> x^2
+multiply x^2, -x -> -x^3
+cmultiply -x^3, c/10 -> -c/10*x^3
+
+isum 10*:a/10*x, 10*:-b/10*y, -z, 10*:-c/10*x^3 -> -(a*x-b*y-z-c*x^3)
+invert -(a*x-b*y-z-c*x^3) -> a*x-b*y-z-c*x^3
+assign a*x-b*y-z-c*x^3 -> z'
+
+output x -> out.x
+output y -> out.y
+output z -> out.z