Working on a processing library/program to store all my most used/fav functions

Please feel free to check it out and give me some feedback, its just a start for now, and i will be improving it as I go along, I will be making another version with PVectors too.

Things I plan to add in the future perlin noise, maze algorithm, pathfinder, and trees


Heres the current progress,

I’ve added a menu system, which includes menus submenus and buttons, I have yet to implement sliders.

Menus are created in one line

buttons are linked to menus, and buttons can further become submenus.
Everything comes with customisability, such as border size, color, fill, highlight, etc. I have yet to make the menu drag function work correctly. You can choose between radio and checkboxes or standard text buttons. The radio and checkbox aren’t complete yet though.

I am currently working on adding textboxes and scrollable text areas, which again would follow the same pattern and have linked parents.

button functions are then called in one line like this;

the toggle2 function interacts with a hashmap inside a given class to toggle certain booleans. Each button comes with its own toggle option two for simpler operations. and I’m going to add a simple click function for when certain booleans are linked to one another.

Boundary class, allows you to add a variety of shapes and lines, ellipse rectangle and line, are ready to go, though I’ve yet to add proper collision, as this will require a matrix class to handle dot products. I will be including bezier curves, convex poligons, concave poligons, triangles, curves, and waves. Again everything will be customizable and draggable.

The pallet on the left will have quick access to the buttons and a color pallet to change the fill and stroke. I will add center of mass to each of the shapes, with a choice to set your own so that you can have interesting physics.

The grid, is really just a array of objects, which can interact with each other and the shapes, the shape and color are customizable. There positions over time are stored in an array and can be replayed through the pause rewind of forward buttons, I will add more functionality later. I have added gravity as an option to the attractors, and once the matrix class is added, will have proper collision for all shapes and their rotations.

grid is called in one line, xpos, ypos, width height, cols, rows;

and all customisations is linkable to buttons. I will add integrated genetic algorithm into the grid class, along with game of life and maze, which will be callable with one boolean, and hopefully later on machine learning.

The grid will also be able to be used to generate terrain through the perlin noise function, or movable cloth.
Also added a 2d plot, and am working on its 3d counterpart.

Finally I have added windows and scenes. Windows are essentially just boxes, and scenes will be navigate-able.

1 Like

The project is now on github.


2d perlin noise now added, Generate random terrain using perlin noise, next to add map travelling capabilities.

terrain, or random color;

map travelling capabilities added, along with 3d view.



also added a simplistic zoom function

Sliders now added to control rotation, scale, and depth, again everything can be controlled with the sliders and the use of hashmaps. Next I will continue adding more shape creation begining with the poligons above four sides curves and beziers. The only thing Im struggling to find is a good way of detecting ellipse collision. I have successfully added point to ellipse collision but line to ellipse or ellipse to ellipse will be very tricky.

I have begun to add kernel convolutions


accessed through image menu, this shall be extended to include webcam feed and data.


Please note that alpha does not work with P2D, not sure why.
simply create a new grid, and load an image.


this will give a list of sliders for interaction, note functionality has not yet been completely implemented.

and a menu to choose between filters

Mouse interaction

line detection

along with alpha




alternative line detection


I shall add more as I go.


Added webcam functionality, image filters color detection and line detection will follow;

2d perlin noise maps can now be contoured.

improved sliders,

added rgb sliders class


listbox class to facilitate menus


and sliderbox to facilitate multiple sliders



also switch to vertical sliders with a setter function


The code is not being syncronized on the Github project; or is it somewhere else?

should be up to date

I can not find the filter functions.

if you are talking about the image filters, I’ve put them in the Grid class. Its called in the Buttons tab, var “g” creates the terrain, “gimg” creates the image filter, and “gcam” creates the webcam.

Webcam currently has no filters.

Please also note that I’m still very much learning programming and haven’t yet implemented reflections to simplify the sliders and buttons. This should be done over the next week but for now you have to add, the variable you are changing to the values hashmap usually found in most of the classes, you have to add it in the constructor, or the spawn() function of the class, and the event listener. Look at the Grid class if you want to see how I’ve implemented it.

Its really hacky and not ideal but works for now.

1 Like

For now I’ve added Brightness filter, sharpening, mouse mask and line detection. Some of these have slider functionality.

1 Like

Sliders have now been finished, and no longer require a hashmap table to function

simply creat the slider, then in mousedragged assign the slider min and max value and the object you are interacting with and the variable you are changing, and finally set said variable to public. Done



this example connects sliders that share a trait in a menu, for greater fluidity, but in this instance you can also call them using the sliderBox class, and name them individually later to save time.


I’ve now added different types of entities, Humans, animals, plants, minerals, and have added Boundaries.

Boundaries can be created individually with code or using the shape menu, simple shapes only so far, ellipse, rectangles and triangles.

All entities can interact with the boundaries and either seek or avoid them.
All entities can spawn other entities according to certain rules, no mating or genetic algorithm yet.
All entities can keep track of their family and or children, and seek or avoid them.

please note polymorphysm isnt completely implemented yet as I didnt completely understand it, shall be done next.

Gravity, rotation boundary stretching and point stretching also added to the shape class, mass and friction in progress.

menu bug fixed,

code on github