Skip to content

Instantly share code, notes, and snippets.

@vznvzn
Created September 16, 2016 00:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vznvzn/ab5f55bde1f17ce531c9869a979e2d9e to your computer and use it in GitHub Desktop.
Save vznvzn/ab5f55bde1f17ce531c9869a979e2d9e to your computer and use it in GitHub Desktop.
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