Making use of the GPU to render huge amount of objects

The createGraphics() function returns a p5.Graphics object which basically stores a canvas.

And a canvas is a bitmap image under the hood but you can define your bitmap resolution to be different than the size of the html element of the canvas (so you can zoom into it).

If you want infinite zoom, you might want to use SVG which is vector based graphics. Unfortunatly it’s not supported in p5.js : Render SVG in P5.js

This is very well explained on the Wikipedia page :

1 Like