summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-01-05 00:10:13 +0000
committerubq323 <ubq323@ubq323.website>2024-01-05 00:10:13 +0000
commit458895d38c99e669c654d189f1761011ba5f389c (patch)
treedfeeac8d06ee207c7de1b83520853710dca32b64
parentfb3c96b1783e575165417d01858fbd100696a283 (diff)
fix verticals
-rw-r--r--catenary.lua5
-rw-r--r--main.lua1
2 files changed, 5 insertions, 1 deletions
diff --git a/catenary.lua b/catenary.lua
index abe18e1..70e128c 100644
--- a/catenary.lua
+++ b/catenary.lua
@@ -71,6 +71,11 @@ local function catenary(x1,y1, x2,y2, L)
y1,y2 = y2,y1
end
+ if math.abs(x1-x2) < 0.0001 then
+ x1 = x1 - 0.01
+ x2 = x2 + 0.01
+ end
+
local f = catenary0(x1,y1,x2,y2,L)
return plot(f, x1,x2)
end
diff --git a/main.lua b/main.lua
index d1a84a8..e1d6748 100644
--- a/main.lua
+++ b/main.lua
@@ -44,7 +44,6 @@ end
ports[3].wires = {ports[6]}
ports[5].wires = {ports[7],ports[2]}
-
local function wire_color(n)
local phi = (1+math.sqrt(5))/2
local h = (360*phi*n)%360