Before I started programming my self-portrait, I realized that it was challenging to imagine in my mind and turn it into something directly, and it was easy to forget some parts, so I designed my self-portrait in Illustrator.
I also chose colors that I liked, and Illustrator can also provide and remind me of the RGB of those colors, which makes my programming a lot easier.
I started by creating several ellipses and squares to sketch out the general structure of the character. I got stuck by the line of my nose, and I didn't know how to define the position of control points in curve(x1, y1, x2, y2, x3, y3, x4, y4).
The symmetrical lines of the mouth are easy to draw, but the lines of the nose are more complex and asymmetrical, which cost me a lot of time. So I decided to use a short straight line to outline the nose.
The symmetrical lines of the mouth are easy to draw, but the lines of the nose are more complex and asymmetrical, which cost me a lot of time. So I decided to use a short straight line to outline the nose. I slightly changed the length and size of the back oval to make my "hair" look less messy.
I started thinking about how to program red lips with irregular shapes. Maybe I can do it with three arcs. As shown in the code below, I removed the arc stroke and turned the arc open by adjusting different angles between 0 to two pi.
Creating lips gave me an idea of how to draw eyes. The eyes with pointy ends and rounded middle can also be made with two Arcs.
By using layering white and black arcs, I made eyeliners with eyes. I also add my "hair fringe" by using a half circle.