How to create GeeksforGeeks logo using p5.js ?
In this article, we will see how to create a GeeksforGeeks logo using p5.js.
Processing is a flexible software sketchbook and a language for learning how to code within the context of the visual arts. We can create different types of arts using our coding skills example is like games, animation And physics engines, etc.
- Set the function setup() which put output window size.
- Initialize a variable with random value(offset = 108).
- Set background colour,nofill, stroke, and position of the logo in draw() function.
- Then start to draw the logo:
- Create two arcs inverted ‘C’ shape.
- Create two horizontal lines in mid of the arcs.
- Make the center of the arcs zero.
- Our logo is complete.
Below is the implementation of above approach.
Step 1: Create two arcs as shown below:
Step 2: Create Horizontal lines