max 800 kol 10 npx npy npz def func return 400 400 640000 end for in k

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
max = 800
kol = 10
npx = []
npy = []
npz = []
def func(x, y)
return (((x - 400)**2 - (y - 400)**2) + 640000)
end
for i in (0 .. (kol - 1))
x = Random.rand(max)
y = Random.rand(max)
z = func(x, y)
npx += [x]
npy += [y]
npz += [z]
print "delaunayTriangulation.addPoint(", x, ", ", y, ", ", z, ");\n"
print "delaunayTriangulation.computeCircumcenters();\n"
end
print "0, 0, ", func(0, 0), "\n"
print "800, 0, ", func(800, 0), "\n"
print "800, 800, ", func(800, 800), "\n"
print "0, 800, ", func(0, 800), "\n"
#print npx, "\n", npy, "\n", npz, "\n"