documentation of the changes for the portrait
The original one looks more exquisite but it’s inflexible for its bunch of hard-coded numbers, so I changed them into the relative position to the center of head.
![](https://freight.cargo.site/t/original/i/19d62df5e36a0e80a737bc649406bafa84b0b120154f9147489109a7ac778105/2021-09-13-22.05.57.png)
![](https://freight.cargo.site/t/original/i/6b2e16220f8daec33085b06004d15c22ad783d8cd36a3605b7d23719d8a31f63/2021-09-13-22.08.43.png)
The function setup() only runs for one time so the random() I put here can draw the rainbows separately and randomly once the code runs.
![](https://freight.cargo.site/t/original/i/70889e96b40be70404441df17e2096569ab56421af17cddb6b69563f53ba8fad/2021-09-13-22.11.01.png)
![](https://freight.cargo.site/t/original/i/265ffcfd199a18b98f508b8a29022fdb877a052d138ba26cbaea60cb3997019c/2021-09-13-22.11.09.png)
![](https://freight.cargo.site/t/original/i/dceddb38e67318b5af6404b5d954f438f11ecbeab219756fe938ecaf1d97e021/2021-09-13-22.12.52.png)
![](https://freight.cargo.site/t/original/i/14c571813e5fc6ac5b592e49a92642f0de98f3fb0f96db606b931a353235d58c/2021-09-13-22.13.01.png)
I used the constant frameCount in sin() to draw a sun going between the left and the right to imitate the sun. So I drew the shadow of nose and neck and made it changes alongside the sunshine.
![](https://freight.cargo.site/t/original/i/d124ccb52d90b08a76b48be36157d5fc878c42214c394da2d6736a8df11b00f1/2021-09-13-22.18.13.png)
![](https://freight.cargo.site/t/original/i/9fcb34ece73f64f26a3c3df66ed58b7ad66369d01242a19d02ae62c965cf1e46/2021-09-13-22.18.19.png)
I combined random() and sin() for the earrings so I can get a random value with amplitude. The width of ellipse changes to illustrate the rotation of earrings.
![](https://freight.cargo.site/t/original/i/d72d98f3f2750c02795284a46b08c79fafafa48747910108805a05aede220612/2021-09-13-22.47.46.png)
![](https://freight.cargo.site/t/original/i/3703c4df4d8c6556a3de5d5e3490bab61351ec509d3d22a7bb53c877733fbda6/2021-09-13-22.23.33.png)
I want the black eyeballs to turn to the direction of mouse, but they shoudn’t run out of the white eyeballs. So I calculate the proportion of mouseX against the separate eyeballs.