Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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


Save Automatically?

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 f = .7;
- d *= f , fs *= f, ad *=f, sw *=f, pr *= f, pr1 *= f, pr2 *= f;

svg(viewBox=[-d, -.5*d, 2*d, d].join(' ') 
		| svg {	fill: #{darken}; font: #{fs}px consolas, monaco, monospace }
		| svg > [d], [r] { fill: none; stroke: #{darken}; stroke-width: #{2*sw} }
		| [y] + [d]:not([d*=z]) { marker-end: url(#e) }
		| [d] + * { font: #{fs}px times new roman, serif }
		| [d] ~ * { font-style: italic }
		| [d] + [d] ~ [y] { fill: #{tomato} }
		| [r='#{hr}'] { stroke: #{llight} }
		| [d][d*=z] { stroke: #{purple}; stroke-width: #{3*sw} }
		| [d] + [d] { stroke: #{orange}; stroke-width: #{4*sw} }
		| [r]:not([r='#{hr}']) { fill: #{orange} }
		| tspan { font-size: .5em }
	marker#e(markerWidth=ad markerHeight=ad 
						viewBox='0 -4 8 8' 
						orient='auto' refX='7')
		path(d='M8 0 0-4V4')
	//-helper circles
	circle(cx=-hrd r=hr)
	circle(cx=hrd r=hr)
	//-radius text
	text(x=+(-.5*(hrd + fs)).toFixed(e) y=-(.5*hrd + .2*fs)) R
	text(x=+(.5*(hrd - .2*fs)).toFixed(e) y=-(.5*hrd + .2*fs)) R
	text(x=+(-.5*(hrd + fs)).toFixed(e) y=(.5*hrd + .8*fs)) R
	text(x=+(.5*(hrd - .2*fs)).toFixed(e) y=(.5*hrd + .8*fs)) R
	text(y=-(hrd + .4*fs)) (0,-R/√2)
	text(y=(hrd + .8*fs)) (0,R/√2)
	text(y=-.2*fs) (0,0)
	text(x=hrd + .4*fs y=fs) (R/√2,0)
	text(x=-(hrd + 5*fs) + .4*fs y=fs) (-R/√2,0)
	path(d=`M${-ax} 0H${ax}`)
	text(x=+(ax - .5*fs).toFixed(e) y=+(-.5*fs).toFixed(e)) x
	text(x=.4*fs y=(f*ax - .2*fs)) y
	//-radius lines
	path(d=`M${-hrd} 0 0${-hrd} ${hrd} 0 0 ${hrd}z`)
	//-segment connecting circle central & intersection points
	path(d=`M${-hrd} 0H${hrd}M0${-hrd}V${hrd}`)
	//-highlighted points
	circle(cx=-hrd r=pr1.toFixed(e))
	circle(cx=hrd r=pr1.toFixed(e))
	circle(cy=-hrd r=pr.toFixed(e))
	circle(cy=hrd r=pr1.toFixed(e))
	//-point names
	text(x=+(-.7*fs).toFixed(e) y=-(hrd + .4*fs)) T
	text(x=+(-.7*fs).toFixed(e) y=(-.2*fs)) O
	text(x=hrd - .4*fs y=fs) O<tspan>0</tspan>
	text(x=-(hrd + 5.4*fs) y=fs) O<tspan>1</tspan>
	text(x=+(-.7*fs).toFixed(e) y=(hrd + .8*fs)) S

// minimal SVG
<svg viewBox='-1750 -875 3500 1750' xmlns=''><style>svg{fill:#333;font:105px consolas,monaco,monospace}svg>[d],[r]{fill:none;stroke:#333;stroke-width:7}[y]+[d]:not([d*=z]){marker-end:url(#e)}[d]+*{font:105px times new roman,serif}[d]~*{font-style:italic}[d]+[d]~[y]{fill:#b53}[r='625']{stroke:#ccc}[d][d*=z]{stroke:#95a;stroke-width:10}[d]+[d]{stroke:#f90;stroke-width:14}[r]:not([r='625']){fill:#f90}tspan{font-size:.5em}</style><marker id='e' markerWidth='7' markerHeight='7' viewBox='0 -4 8 8' orient='auto' refX='7'><path d='M8 0 0-4V4'/></marker><circle cx='-442' r='625'/><circle cx='442' r='625'/><text x='-274' y='-242'>R</text><text x='211' y='-242'>R</text><text x='-274' y='305'>R</text><text x='211' y='305'>R</text><text y='-484'>(0,-R/√2)</text><text y='526'>(0,R/√2)</text><text y='-21'>(0,0)</text><text x='484' y='105'>(R/√2,0)</text><text x='-925' y='105'>(-R/√2,0)</text><path d='M-1230 0H1230'/><text x='1178' y='-53'>x</text><path d='M0-861V861'/><text x='42' y='840'>y</text><path d='M-442 0 0-442 442 0 0 442z'/><path d='M-442 0H442M0-442V442'/><circle cx='-442' r='13'/><circle cx='442' r='13'/><circle cy='-442' r='18'/><circle cy='442' r='13'/><circle r='9'/><text x='-74' y='-484'>T</text><text x='-74' y='-21'>O</text><text x='400' y='105'>O<tspan>0</tspan></text><text x='-1009' y='105'>O<tspan>1</tspan></text><text x='-74' y='526'>S</text></svg>


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

svg { display: block }


                // minimal SVG: