What is Nostr?
py5coding /
npub1snh…2xgv
2024-01-16 22:18:39

py5coding on Nostr: Creating 10_000 of something is easy with #py5's vectorized methods. Here, the ...

Creating 10_000 of something is easy with #py5's vectorized methods. Here, the `vertices()` and `set_strokes()` methods are used to quickly create and color 10_000 points.

size(999, 999, P2D)
color_mode(CMAP, "hot")
stroke_weight(32)
s = create_shape()
with s.begin_shape(POINTS):
s.vertices(999 * np.random.rand(N:=10000, 2))
s.set_strokes(color(x / N, 64)for x in range(N))
shape(s)

#processing #genuary #genuary16

Author Public Key
npub1snhr369rl5q977dd2n8rnxy95zsyj0engh70ehvjx5uefvjmezds852xgv