I've been a fan of My Little Pony: Friendship Is Magic for a long time, and very early on I created a pony version of myself also called Parcly Taxel (warning: may be too cute to look at). The symbol below is her "cutie mark", which you will be drawing here:
Construction
All key points of the cutie mark lie on a rotated hexagonal grid, which will be given coordinates such that (1,0) is 15 degrees counterclockwise from the \$+x\$-axis and (0,1) is likewise 75 degrees counterclockwise.
- One of the six "arms" of the galaxy is bounded by the following segments in order:
- A cubic Bézier curve with control points (3,-2), (4,0), (5,4), (-2,12)
- A straight line from (-2,12) to (3,9)
- A cubic Bézier curve with control points (3,9), (7,3), (6,-1), (4,-3)
- A straight line from (4,-3) to (3,-2)
- The other five arms are obtained by successive 60-degree rotations of the initial arm about the origin. Their fill alternates between RGB
#5A318E
/(90,49,142)
(dark blue) and#54A2E1
/(84,162,225)
(light blue), with the initial arm getting#5A318E
. They have no stroke. - Layered above the arms is a regular hexagon centred on the origin and with one vertex at (5,1). It has no fill and is instead stroked with RGB colour
#576AB7
/(87,106,183)
(medium blue), has stroke width 0.5 and has miter join. Parts of the arms should show inside the hexagon.
Task
Draw Parcly Taxel's cutie mark, with the following stipulations:
- Your program must generate the image by itself and not download it from a website.
- The image can be saved to a file or piped raw to stdout in any common image file format, or it can be displayed in a window.
- The image must have (to best effort) the same orientation and aspect ratio as those implied by the construction. Raster images must be at least 400 pixels wide, and an error of 2 pixels/1% is allowed.
- If your language does not support arbitrary RGB colours you may use any colours reasonably recognisable as light, medium and dark blue.
This is code-golf; fewest bytes wins.
I made this challenge to celebrate reaching 100,000 reputation on the Mathematics Stack Exchange, which I achieved on 27 February 2023.
<use>
). Are shape description languages like SVG and TikZ allowed? \$\endgroup\$