Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.



- var o = -.5*d, f = .1;
- var vb_y = -f*d, vb_x = o + vb_y;
- var ax0 = +((1 - k)*vb_y).toFixed(e);
- var ax1 = +((1 - k)*(d + vb_y)).toFixed(e);
- var r = +(.75*ax1).toFixed(e), rd = +(r/Math.sqrt(2)).toFixed(e);
- var dr = ax1 - r, c = Math.round(.551915*r);

svg(viewBox=[vb_x, vb_y, 2*d, d].join(' ') 
		| * { fill: #{darken}; stroke-linecap: round; font: #{fs}px consolas, monaco, monospace }
		| [d], [r] { fill: none; stroke: #{orange}; stroke-width: #{2*sw} }
		| [x] + [d] { stroke: #{llight} }
		| [d*=A], [d*=h] { stroke-width: #{4*sw} }
		| [d*=A] { stroke: #{orange} }
		| [d*=A] + * { stroke: #{purple}; stroke-width: #{3*sw} }
		| [r] { fill: #{orange}; stroke: #{darken} }
		| [r] + * { word-spacing: #{-.35*fs}px }
		| [r] + [x] ~ * { font-style: italic }
	//-radius text on axes
	text(x=.5*(r - fs) y=-.2*fs) R
	//-axes + helper lines
	path(d=`M${ax0} 0H${ax1}M0${ax0}V${ax1}M${2*ram} 0V${2*ram}H0M${r - 2*ram} 0V${2*ram}H${r}M${2*ram} ${r}V${r - 2*ram}H0M${r} 0V${r}H0`)
	//-radius text on axes
	text(x=-.8*fs y=.5*(r + fs)) R
	//-perpendic dots
	path(d=`M${ram} ${ram}h1M${r - ram} ${ram}h1M${ram} ${r - ram}h1`)
	path(d=`M${r} 0A${r} ${r} 0 0 1 0 ${r}`)
	//-ctrl points guides
	path(d=`M${r} 0V${c}M0 ${r}H${c}`)
	text(x=(.5*c - fs) y=(r + .8*fs)) C·R
	text(x=(r + .2*fs) y=(.5*c + .4*fs)) C·R
	//-hl circles
	circle(cx=r r=pr)
	circle(cy=r r=pr)
	circle(cx=r cy=c r=pr)
	circle(cx=c cy=r r=pr)
	circle(cx=r cy=r r=Math.round(.5*pr))
	text(x=ax1 y=ax1) C = .551915
	//-point names
	text(x=-.8*fs y=-.2*fs) O
	text(x=r - .2*fs y=-.3*fs) N
	text(x=r + .1*fs y=r + .6*fs) P
	text(x=-.8*fs y=r + .2*fs) Q

// minimal SVG
<svg viewBox='-1500 -250 5000 2500' xmlns=''><style>*{fill:#333;stroke-linecap:round;font:150px consolas,monaco,monospace}[d],[r]{fill:none;stroke:#f90;stroke-width:10}[x]+[d]{stroke:#ccc}[d*=A],[d*=h]{stroke-width:20}[d*=A]{stroke:#f90}[d*=A]+*{stroke:#95a;stroke-width:15}[r]{fill:#f90;stroke:#333}[r]+*{word-spacing:-53px}[r]+[x]~*{font-style:italic}</style><text x='727' y='-30'>R</text><path d='M-238 0H2138M0-238V2138M160 0V160H0M1444 0V160H1604M160 1604V1444H0M1604 0V1604H0'/><text x='-120' y='877'>R</text><path d='M80 80h1M1524 80h1M80 1524h1'/><path d='M1604 0A1604 1604 0 0 1 0 1604'/><path d='M1604 0V885M0 1604H885'/><text x='293' y='1724'>C·R</text><text x='1634' y='503'>C·R</text><circle r='18'/><circle cx='1604' r='25'/><circle cy='1604' r='25'/><circle cx='1604' cy='885' r='25'/><circle cx='885' cy='1604' r='25'/><circle cx='1604' cy='1604' r='13'/><text x='2138' y='2138'>C = .551915</text><text x='-120' y='-30'>O</text><text x='1574' y='-45'>N</text><text x='1619' y='1694'>P</text><text x='-120' y='1634'>Q</text></svg>


                body {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	margin: 0;
	height: 100vh;

svg { display: block }


                // minimal SVG: