diff options
-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) |