Sun icon
Added in v0.2.0
A free pencil-style sun icon, drawn by code from 1 circle and 8 lines. Use it as an SVG, a React component, or by name. MIT licensed.
01Use it
Use sun
One package, four ways in. The icon inherits currentColor and is decorative unless you give it a title. Install it with npm i @matita/icons.
React
import { Sun } from '@matita/icons/react';
<Sun size={24} />
// or by name
import { SketchIcon } from '@matita/icons/react';
<SketchIcon name="sun" />JavaScript
import { Sun, toSvg } from '@matita/icons';
toSvg(Sun, { size: 24 }); // SVG stringSVG
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" overflow="visible" class="sketch-icon sketch-icon-sun" data-sketch="" aria-hidden="true"><path d="M10.84 15.89C10.61 15.75 9.88 15.41 9.46 15.05C9.04 14.7 8.56 14.27 8.32 13.76C8.07 13.25 7.98 12.57 7.99 11.97C7.99 11.38 8.13 10.75 8.35 10.2C8.57 9.66 8.91 9.12 9.31 8.7C9.72 8.29 10.24 7.94 10.77 7.73C11.3 7.52 11.94 7.36 12.5 7.43C13.06 7.5 13.64 7.83 14.13 8.15C14.62 8.48 15.09 8.9 15.44 9.39C15.8 9.88 16.13 10.5 16.26 11.11C16.39 11.72 16.33 12.42 16.21 13.06C16.1 13.7 15.91 14.39 15.57 14.92C15.23 15.46 14.7 15.95 14.16 16.25C13.62 16.56 12.97 16.66 12.35 16.74C11.73 16.82 11.02 16.93 10.44 16.73C9.86 16.53 9.3 16.02 8.85 15.54C8.41 15.06 7.95 14.14 7.77 13.86" stroke-width="1.68"/><path d="M11.94 2.54Q12.02 4.29 12.14 6.04" stroke-width="1.584"/><path d="M11.89 18.28Q11.91 19.79 11.89 21.3" stroke-width="1.744"/><path d="M2.32 11.94Q3.94 12.04 5.57 11.98" stroke-width="1.68"/><path d="M18.04 12.15Q19.75 12.05 21.47 11.8" stroke-width="1.76"/><path d="M5.22 5.26Q6.51 6.56 7.84 7.82" stroke-width="1.648"/><path d="M16.49 7.77Q17.66 6.64 18.72 5.4" stroke-width="1.664"/><path d="M5.34 18.75Q6.47 17.41 7.58 16.06" stroke-width="1.44"/><path d="M16.33 16.5Q17.6 17.44 18.75 18.51" stroke-width="1.808"/></svg>Pencil variant
import '@matita/icons/pencil.css';
import { Sun } from '@matita/icons/react';
<Sun size={32} pencil />The file is icons/sun.svg in the package (pencil/sun.svg for the pencil variant). Matita 0.7.0.
02How it's drawn
The recipe for sun
Sun is not stored as a drawing. It is a recipe of 1 circle and 8 lines on a 24 by 24 grid, and a small program draws it like a pencil would. The wobble comes from the name, so it always comes out the same.
C 12 12 4;
L 12 3 12 5.5;
L 12 18.5 12 21;
L 3 12 5.5 12;
L 18.5 12 21 12;
L 5.6 5.6 7.4 7.4;
L 16.6 7.4 18.4 5.6;
L 5.6 18.4 7.4 16.6;
L 16.6 16.6 18.4 18.4
sun as a number: 3763224417
Shapes: L line, P polyline, Z closed shape, R rectangle, C circle, E ellipse, A arc, Q curve, B bezier curve, S smooth line, O dot. Separate shapes with ;. Edits stay on this page.
03Takes, sizes, pencil
Same icon, every way
Pass a seed for another take of the same recipe. The wobble is capped, so it still reads at 16 px.
Five seeds of sun. Seed 0 is the default.
sun from exact shapes (wobble 0) to the full hand (wobble 1, the default). The exact version is also a ready-made file: exact/sun.svg.
True pixel sizes.