3 comments

[ 0.23 ms ] story [ 17.3 ms ] thread
- Source of the blog (not me): https://blog.wolfram.com/author/silvia-hao/

Stippling is an old topic. The question is simple: how to optimaly place points to fit a target distribution. Artists do that, and mathematicians search for algorithms to do it with computers, which is quite a challenge because naive formulations are intractable.

- Implementation based on Gaussian Blue Noise (me, both notebook and package): Feel free to explore stippling on your own images, from google Colab https://colab.research.google.com/drive/1W15QE8Boj0-Ld4Dx3N2... or directly by using the package if you are familiar with Python:

======== installation ===================== pip install matplotlib requests (utilities ) pip install blue-sampler (my package) ============================================

#Download exemple import requests url = "https://raw.githubusercontent.com/For-a-few-DPPs-more/rgbn/m..." with open("exemple.jpg", "wb") as f: f.write(requests.get(url).content)

#Run the stippling import blue_sampler as blue #generate the points points = blue.im2points(N = 22_500, image = "exemple.jpg")

#Save the figure (optional) import matplotlib.pyplot as plt fig, _ = blue.plot(points, return_fig = True) fig.savefig("result.png", dpi=200, bbox_inches="tight") plt.close(fig)

#Zoom in blue.plot(points, auto_zoom = True, max_points = 5_000)

-Source for the theory of Gaussian Blue Noise (not me): Ahmed, Abdalla G. M. and Ren, Jing and Wonka, Peter (2022, doi 10.48550/arXiv.2206.07798)

This seems very related to adaptive meshing algorithms, for which there are many naive formulations, and not all are intractable.
(comment deleted)