Urpflanze: a javascript library for creative coding

genbs

Gennaro

Posted on December 17, 2020

Urpflanze: a javascript library for creative coding

For some time now, I have been feeling the need to use the code not for commercial purposes, but purely for fun.

This is why I am approaching the world of creative coding.

One big difficulty I immediately encountered was the lack of knowledge of linear algebra and trigonometry, and this is the reason why I decided to develop a library that would make the approach easier even for the less experienced user.

Mandalas have always fascinated me, so I started with simple shapes such as lines and polygons, and I worked on how to distribute them on a circumference.

Urpflanze

I focused on managing every single repetition and encapsulating the generated shapes, which allowed me to create new forms starting from the previous and simpler ones.

In addition to circular repetitions, I also added the possibility of creating matrices and some effects during the drawing phase, such as viewing the previous frames or disabling the deletion of the canvas at each frame.

Perfect to create images or animations, it can be used for texture generation, as support to other vector graphics software (thanks to SVGExporter), or to print with Penplotter.

At the moment the roadmap available are:

  • Documentation for other services (e.g. DrawerSVG)
  • a web-based editor already under development (a very old version is at this link https://gifted-booth-1ad22e.netlify.app/)
  • Rendering in WebGL
  • Audio library to create sounds from shapes and vice versa

Let me know what you think about this :)

GitHub logo urpflanze-org / urpflanze

A library for developers who want to approach to creative coding, artists who want to approach coding and for those who find it fun to play with math.

Synopsis

This library is based on the Urpflanze package for generate the scene.

It deals with creating two-dimensional shapes, repeating them, manipulating them point by point and encapsulating them.

Motivations

The creation of this library comes from the need to create simple APIs for manage the repetition of primitive shapes and the possibility of applying transformations to each of them, applying transformations on the points avoiding the use of canvas transformations.

Another need - which then became one of the main features - was to be able to encapsulate the result of a generation and manage it as if it were a new shape.

Donate

I am trying to create a tool for those who want to approach the world of programming or for programmers who want to approach the world of creative coding.

I have spent a lot of time and will spend more to support this project I…

Docs and Examples

💖 💪 🙅 🚩
genbs
Gennaro

Posted on December 17, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related