Blue noise image stippling in Processing (requires GPU)

Overview

atoMeow

Blue noise image stippling in Processing (requires GPU)

Many Twitter friends are talking about sample code, and I think Processing is probably the best platform to write a demo. This demo is created for coders who are familiar with this awesome creative coding platform. You may quickly modify the code to work for video or to stipple your own Procssing drawings by turning them into PImage and run the simulation. This demo code also serves as a reference implementation of my article Blue noise sampling using an N-body simulation-based method. If you are interested in 2.5D, you may mod the code to achieve what I discussed in this artist friendly article.

This code has been tested on Processing 3.5.4 (Windows 10 (nVIDIA GPU) and MacOS Big Sur (MBP 2016 with Intel Iris)).

Input Input
Original atoMeow Moving Stipples on Twitter My Fav. Hokusai

QuickStart

Many sim-essential global variables are highlighted and documented, please study the usual setup() and draw() functions for how the simulation code works. You may use any PImage as Field image (Electrostatic field) and feed it to void updateField( ) (line #203) function; it will be automatically resized to fit the size int simXY; (line #47). The maximum number of dots to simulate is determined by int bufXY; (line #46), please note that they both shall raise the GPU memory demand. (I find 8192 points reasonable for most laptops). The function void sim(int n); is designed to run a number of steps before return such that you could sub-sample easily the outputs or for creating your image sequence stippling (Yes! Processing Video library reads frames into Processing as PImage ? (I recall ...). I believe you will do your homework!

Have Fun! If you have never coded with Processing, you are missing something very important !! Go https://www.processing.org/ (20 Years Anniversary) and you will create your first sketch before you finish your Latte.

Making-Of Note

I have not used Processing for a long time .... so my know-how is rusty; I was looking for the possibility of using compute shaders (render to multiple tragets) but no luck and no time. Please enlighten me if there are better ways, my Twitter @artixels. Anyways, so I actually made a Dirty Hack of encoding 2x Half-precision (I am a VFX guy) float (per-particle pos(x,y), vel(x,y) and acc(x,y)) to fit into a color of Processing. This allows results to be captured using .copy() of PGraphics and pipe them down to next shader via a PImage. I am glad the round-tripping was working quickly too, thanks to the awesome Java function I found in Stackoverflow by x4u. Another good 16-bit Half float option by Martijn Courteaux for the range 0.0 - 1.0 (no sign) is also very attractive, it should be great for next creative coding project.

Okay! thank you for your interest and love of the atoMeow.

You might also like...
A small Python module for BMP image processing.

micropython-microbmp A small Python module for BMP image processing. It supports BMP image of 1/2/4/8/24-bit colour depth. Loading supports compressio

Image Processing HighPass Filter With Python
Image Processing HighPass Filter With Python

Image_Processing_HighPassFilter High Pass Filter take the high frequency and ignore the low frequency High Pass Filter can be use to sharpening an ima

kikuchipy is an open-source Python library for processing and analysis of electron backscatter diffraction (EBSD) patterns
kikuchipy is an open-source Python library for processing and analysis of electron backscatter diffraction (EBSD) patterns

kikuchipy is an open-source Python library for processing and analysis of electron backscatter diffraction (EBSD) patterns. The library builds on the

Using P5.js, Processing and Python to create generative art
Using P5.js, Processing and Python to create generative art

Experiments in Generative Art Using Python, Processing, and P5.js Quick Links Daily Sketches March 2021. | Gallery | Repo | Done using P5.js Genuary 2

Pixel Brush Processing Unit
Pixel Brush Processing Unit

Pixel Brush Processing Unit The Pixel Brush Processing Unit (PBPU for short) is a simple 4-Bit CPU I designed in Logisim while I was still in school a

An executor that performs standard pre-processing and normalization on images.

An executor that performs standard pre-processing and normalization on images.

An open source image editor which can manipulate an image in many ways!

Image Editor - An open source image editor which can manipulate an image in many ways! If you need any more modes in repo or I

Image enhancing model for making a blurred image to be somehow clearer than before

This is a very small prject which helps in enhancing the images by taking a Input images. This project has many features like detcting the faces and enhaning the faces itself and also a feature which enhances the whole image

Easily turn large sets of image urls to an image dataset. Can download, resize and package 100M urls in 20h on one machine.
Easily turn large sets of image urls to an image dataset. Can download, resize and package 100M urls in 20h on one machine.

img2dataset Easily turn large sets of image urls to an image dataset. Can download, resize and package 100M urls in 20h on one machine. Also supports

Releases(v1.0.0)
Owner
Mike Wong
computation media artist x technologist | vfx nerd
Mike Wong
impy is an all-in-one image analysis library, equipped with parallel processing, GPU support, GUI based tools and so on.

impy is All You Need in Image Analysis impy is an all-in-one image analysis library, equipped with parallel processing, GPU support, GUI based tools a

null 24 Dec 20, 2022
GPU-accelerated image processing using cupy and CUDA

napari-cupy-image-processing GPU-accelerated image processing using cupy and CUDA This napari plugin was generated with Cookiecutter using with @napar

Robert Haase 16 Oct 26, 2022
clesperanto is a graphical user interface for GPU-accelerated image processing.

clesperanto is a graphical user interface for a multi-platform multi-language framework for GPU-accelerated image processing. It is based on napari and the pyclesperanto-prototype.

null 1 Jan 2, 2022
Anaglyph 3D Converter - A python script that adds a 3D anaglyph style effect to an image using the Pillow image processing package.

Anaglyph 3D Converter - A python script that adds a 3D anaglyph style effect to an image using the Pillow image processing package.

Kizdude 2 Jan 22, 2022
PIX is an image processing library in JAX, for JAX.

PIX PIX is an image processing library in JAX, for JAX. Overview JAX is a library resulting from the union of Autograd and XLA for high-performance ma

DeepMind 294 Jan 8, 2023
A Python package implementing various HDRI / Radiance image processing algorithms.

Colour - HDRI A Python package implementing various HDRI / Radiance image processing algorithms. It is open source and freely available under the New

colour-science 111 Dec 6, 2022
starfish is a Python library for processing images of image-based spatial transcriptomics.

starfish: scalable pipelines for image-based transcriptomics starfish is a Python library for processing images of image-based spatial transcriptomics

null 199 Dec 8, 2022
image-processing exercises.

image_processing Assignment 21 Checkered Board Create a chess table using numpy and opencv. view: Color Correction Reverse black and white colors with

Benyamin Zojaji 25 Dec 15, 2022
Simple Python image processing & automatization project for a simple web based game

What is this? Simple Python image processing & automatization project for a simple web based game Made using only Github Copilot (except the color and

SGeri 2 Aug 15, 2022
Napari simpleitk image processing

napari-simpleitk-image-processing (n-SimpleITK) Process images using SimpleITK in napari Usage Filters of this napari plugin can be found in the Tools

Robert Haase 11 Dec 19, 2022