Skip to content

A program that converts an image into a collection of primitive shapes, created in p5js!

Notifications You must be signed in to change notification settings

AndrewSink/Primitive-Pointillism-Program

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Primitive-Pointillism-Program

A program that converts an image into a collection of primitive shapes, created in p5js!

Try it online here: https://www.openprocessing.org/sketch/947598

This program will generate a pointillism portrait using randomly selected points on an uploaded image and generating primitive shape at those points. The types of primitives can be controlled (square, triangle, circle, or random), and you can selected more than one at a time.

The 'random' selection will add a random int. from a small range to the generated primitive, creating irregular shapes.

From the interface, you can also add a grayscale filter and export the image as a .PNG.

Interface Features

Speed: Varies the speed of the primitive generation (tied to FPS, defaults to 60, range from 24-60)

Size: Controls the size of the generated primitives.

Transparency: Controls the transparency of the generated primitives. Higher transparency leads to a softer looking picture, lower transparency (or opaque) has a solid appearance

Choose file: Allows user to input a file. The canvas will automatically resize to the size of the imported picture. All files are rescaled to 500 px width upon input, with height kept relative to scale.

Reset / Resize: Clears canvas

Timelapse of program running:

The initial code was inspired by Daniel Shiffman's Pointillism Processing program, and interface was inspired by Michael Fogleman's Primitive.

Feel free to reach out to me on Twitter with any questions!

About

A program that converts an image into a collection of primitive shapes, created in p5js!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published