/circle-random-lines

A circle created by random lines. Made with p5.js

Primary LanguageJavaScriptGNU Affero General Public License v3.0AGPL-3.0

circle random lines

Netlify Status

a circle created dynamically by random lines

Visit

Technologies Used

                           

Description

A colorful three-dimensional cube that rotates to x-axis and the y-axis according to the movement of the cursor inside the window. It is created dynamically on page load, according to window dimensions. Click to switch colors and redraw.

A line is drawn from a point in the center of the canvas to a random point located inside an imaginary circle. Then a new line is drawn from the previous random point to a new random point, still located inside an imaginary circle. The process is repeaded indefinitely and, using trigonometry and magic, a circle starts to form.It is housed in a simple HTML page, with some essential CSS.

Click to reverse colors, double-click to enter fullscreen mode, double-click again (or press ESC) to leave fullscreen mode.

Originally, I created it using Processing, and then I ported it to the web using Processing's JavaScript sibling, p5.js.

Demo

Screenshot

Related Projects

License

Copyright (c) 2023 Michael Kolesidis
Licensed under the GNU Affero General Public License v3.0.