Created
September 16, 2016 00:54
-
-
Save vznvzn/ab5f55bde1f17ce531c9869a979e2d9e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c = 50 | |
y = 0.0 | |
w = 0.75 | |
w = 1.0 if (!ARGV[0].nil?) | |
c.times \ | |
{ | |
x = 0.0 | |
c.times \ | |
{ | |
y1, y2 = y, y + w | |
y1, y2 = y2, y1 if (rand(2) == 1) | |
p1 = [x, y1] | |
p2 = [x + w, y2] | |
puts(p1.join("\t")) | |
puts(p2.join("\t")) | |
puts | |
x += 1.0 | |
} | |
y += 1.0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment