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
Python library for ascii graphics

Python library for ascii graphics

Anton 6 Oct 20, 2021
Find target hash collisions for Apple's NeuralHash perceptual hash function.💣

neural-hash-collider Find target hash collisions for Apple's NeuralHash perceptual hash function. For example, starting from a picture of this cat, we

Anish Athalye 630 Jan 01, 2023
This tool allows the user to convert a 16 by 16 image into a list with numbers representing an object/character.

Room Formatter This tool allows the user to convert a 16 by 16 image into a list with numbers representing an object/character. There is cur

Thomas Landstra 1 Nov 13, 2021
Simple to use image handler for python sqlite3.

SQLite Image Handler Simple to use image handler for python sqlite3. Functions Function Name Parameters Returns init databasePath : str tableName : st

Mustafa Ozan Çetin 7 Sep 16, 2022
An executor that wraps 3D mesh models and encodes 3D content documents to d-dimension vector.

3D Mesh Encoder An Executor that receives Documents containing point sets data in its blob attribute, with shape (N, 3) and encodes it to embeddings o

Jina AI 11 Dec 14, 2022
Detecting haze image with hazer.

hazer-py Detecting haze image with hazer. What is hazer Hazer is a lib for getting "haze degree". This repository is python version of hazer: https://

Joey777210 2 Dec 27, 2021
An ascii art generator that's actually good. Does edge detection and selects the most appropriate characters.

Ascii Artist An ascii art generator that's actually good. Does edge detection and selects the most appropriate characters. Installing Installing with

18 Jan 03, 2023
TRREASURE_IMAGE is python lib by which you can hide anything in a .jpg image with Command-Line Interface[cli] feature

TRREASURE_IMAGE TRREASURE_IMAGE is a python third-party library with Command-Line Interface[cli] feature. Table of Contents General Info Python librar

Fatin Shadab 3 Jun 07, 2022
Make GIFs from time-stacked xarray.DataArrays (time, [optional band], y, x), dead-simple.

GeoGIF Make GIFs from time-stacked xarray.DataArrays (time, [optional band], y, x), dead-simple. from geogif import gif, dgif gif(data_array) dgif(das

Gabe Joseph 47 Dec 22, 2022
New program to export a Blender model to the LBA2 model format.

LBA2 Blender to Model 2 This is a new program to export a Blender model to the LBA2 model format. This is also the first publicly released version of

2 Nov 30, 2022
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

Romain Beaumont 1.4k Jan 01, 2023
FrostedGlass is a translucent frosted glass effect widget, that creates a context with the background behind it.

FrostedGlass FrostedGlass is a translucent frosted glass effect widget, that creates a context with the background behind it. The effect is drawn on t

Kivy Garden 24 Dec 10, 2022
Parking management project which generates barcode parking ticket with user-friendly Tkinter program GUI

Parking-management-system Parking management project which generates barcode parking ticket with user-friendly Tkinter program GUI How to run Download

1 Jul 03, 2022
Tool that takes your photo and generates a pixelated color by number photo.

Color by number Tool that takes your photo and generates a pixelated color by number photo. Requirements You need to have python installed on your com

1 Dec 18, 2021
QR code python application which can read(decode) and generate(encode) QR codes.

QR Code Application This is a basic QR Code application. Using this application you can generate QR code for you text/links. Using this application yo

Atharva Parkhe 1 Aug 09, 2022
A Python package implementing various CFA (Colour Filter Array) demosaicing algorithms and related utilities.

Colour - Demosaicing A Python package implementing various CFA (Colour Filter Array) demosaicing algorithms and related utilities. It is open source a

colour-science 218 Dec 04, 2022
CropImage is a simple toolkit for image cropping, detecting and cropping main body from pictures.

CropImage is a simple toolkit for image cropping, detecting and cropping main body from pictures. Support face and saliency detection.

Haofan Wang 15 Dec 22, 2022
Anime2Gif - an algorithm that detects scenes in a video and generates gifs from it

Anime2Gif Anime2Gif is an algorithm that detects scenes in a video and generates gifs from it. How to use To use it, first, you'll need to install it'

1 Dec 09, 2021
Gaphor is the simple modeling tool

Gaphor Gaphor is a UML and SysML modeling application written in Python. It is designed to be easy to use, while still being powerful. Gaphor implemen

Gaphor 1.3k Dec 31, 2022
Computational Xmas Tree lights!

Computational Xmas Tree This repo contains the code for the computational illumination of a Christmas Tree! It is based on the work by Matt Parker fro

GSD6338 146 Dec 23, 2022