diff options
author | ubq323 <ubq323@ubq323.website> | 2024-01-05 18:49:34 +0000 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2024-01-05 18:49:34 +0000 |
commit | 0c3cf4395c350b37a19da299e3ad286a2c3397e6 (patch) | |
tree | e684bf5e9e209964243801413dce59f6c3fc6a7b | |
parent | 60a571914e782a23cee23765fd87d52c844f3df1 (diff) |
-rw-r--r-- | main.lua | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -280,21 +280,21 @@ function PortGraph.remove_conn(self,p1,p2) end local pg = PortGraph:make() -local i = 1 -local S = math.sqrt(3) -for q = -3,2 do - for r = -3,3 do - local x = q*S + r*S/2 - local y = r*3/2 - pg:add(x/4,y/4,i) - i=i+1 - end -end --- local n = 10 --- for i = 1,n do --- local theta = tau * i/n --- pg:add(math.cos(theta), math.sin(theta), i) +-- local i = 1 +-- local S = math.sqrt(3) +-- for q = -3,2 do +-- for r = -3,3 do +-- local x = q*S + r*S/2 +-- local y = r*3/2 +-- pg:add(x/4,y/4,i) +-- i=i+1 +-- end -- end +local n = 10 +for i = 1,n do + local theta = tau * i/n + pg:add(math.cos(theta), math.sin(theta), i) +end function love.mousepressed(x,y,b) local ok, err = pcall(pg.click, pg, b) |