Self-Portrait with P5.js // ICM W1
Sep 8, 2024
Concept and Design
1. Concentric Circles:
- Each circle grows larger as it moves outward from the center.
- The innermost circle is solid in color, representing a concentrated point in time, while the outer circles become lighter, symbolizing how time diffuses and experiences shape us.
- The outermost circle has an orange outline, indicating permeability and openness to change.
2. Animation:
- A line extending from the center to the outermost circle represents direction and growth.
- The idea is that the point on the outer edge would be dynamic, moving around the circumference of the largest circle, symbolizing potential growth in all directions.
Initial Plan
Pseudocode:
- I initially sketched out the pseudocode and logic on paper.
- The plan involved defining 6 concentric circles (`C1` to `C6`), where `C1` is the smallest and `C6` is the largest.
- I planned to use the `mouseX` and `mouseY` functions to interactively move a point along the circumference of the circles.Best practices for creating a landing page
Implementation
1. Drawing the Circles:
- I initially faced an issue with the order of rendering. Since JavaScript compiles from top to bottom, the largest circle (`C6`) was drawn last, hiding the smaller circles underneath.
2. Rectified Approach:
- To fix this, I reversed the order, drawing the largest circle first (`C6`), followed by smaller circles, which rendered correctly.
3. Circle Properties:
- Each circle had different properties:
- Stroke weight: Differentiated the circles with various stroke weights.
- Stroke color: Gave distinct colors to each circle's stroke.
- Fill: Used for solid color in the center and lighter colors moving outward.
Issues Encountered
- I wanted to animate the line that extends from the center of the circles to their circumference. The idea was to move a point around the circumference interactively using `mouseX` and `mouseY` for real-time interaction.
- However, I faced several errors in trying to implement this interaction, particularly in positioning and animating the point correctly along the circular path.
Next Steps
- Resolve the issue with the line animation using `mouseX` and `mouseY`.
- Smooth the motion of the point along the circumference.
- Possibly introduce more dynamic changes like altering stroke color or thickness based on the movement of the point.