diff --git a/2021/sketch_2021_06_22a/sketch_2021_06_22a.gif b/2021/sketch_2021_06_22a/sketch_2021_06_22a.gif new file mode 100644 index 00000000..d4338271 Binary files /dev/null and b/2021/sketch_2021_06_22a/sketch_2021_06_22a.gif differ diff --git a/2021/sketch_2021_06_22a/sketch_2021_06_22a.pyde b/2021/sketch_2021_06_22a/sketch_2021_06_22a.pyde new file mode 100644 index 00000000..16585c85 --- /dev/null +++ b/2021/sketch_2021_06_22a/sketch_2021_06_22a.pyde @@ -0,0 +1,33 @@ +from itertools import product +from itertools import combinations + +add_library('peasycam') + +def setup(): + global nodes, pairs + size(600, 600, P3D) + cam = PeasyCam(this, 1000) + row = range(-300, 301, 200) + nodes = list(product(row, repeat=3)) + pairs = [(a, b) for a, b + in combinations(nodes, 2) + if a[2] == b[2] + and abs(a[0] - b[0]) <= 200 + and abs(a[1] - b[1]) <= 200 + ] +def draw(): + rotateX(HALF_PI) + background(200) + fill(200, 0, 0) + for x, y, z in nodes: + node(x, y, z) + for (xa, ya, za), (xb, yb, zb) in pairs: + line(xa, ya, za, xb, yb, zb) + +def node(x, y, z): + pushMatrix() + translate(x, y, z), + box(10) + popMatrix() + + diff --git a/README.md b/README.md index a6d1d371..b185d596 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,12 @@ Here are listed some of the tools I have been using: --- +![sketch_2021_06_22a](2021/sketch_2021_06_22a/sketch_2021_06_22a.gif) + +[sketch_2021_06_22a](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_06_22a) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)] + +--- + ![sketch_2021_06_21c_noise_terrain](2021/sketch_2021_06_21c_noise_terrain/sketch_2021_06_21c_noise_terrain.gif) [sketch_2021_06_21c_noise_terrain](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_06_21c_noise_terrain) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]