kopia lustrzana https://github.com/villares/sketch-a-day
main
rodzic
10ba491a93
commit
935c458c0d
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 792 KiB |
|
@ -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()
|
||||
|
||||
|
|
@ -26,6 +26,12 @@ Here are listed some of the tools I have been using:
|
|||
|
||||
---
|
||||
|
||||

|
||||
|
||||
[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](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)]
|
||||
|
|
Ładowanie…
Reference in New Issue