cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation

     

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.

            
              [[[https://codepen.io/thebabydino/pen/zEbVPO]]]

- var f = .7, ay = f*ax;
- d *= f, ad *=f, sw *=f, pr *= f, pr1 *= f, pr2 *= f, ram *= f;
- fs = +(.8*f*fs).toFixed(e);

svg(viewBox=[-d, -(.57*d).toFixed(e), 2*d, d].join(' ') 
		xmlns='http://www.w3.org/2000/svg')
	style
		| svg { fill: #333; font: #{fs}px consolas, monaco, monospace }
		| svg > [d], [r] { fill: none; stroke: #ccc; stroke-width: #{2*sw} }
		| [y] + [d] { stroke: #333; marker-end: url(#e) }
		| [d] + [d] ~ [r] { fill: #f90; stroke: #333 }
		| [d] + [y], #e * {  font: #{fs}px times new roman, serif }
		| [r] + [d] { stroke: #f90; stroke-width: #{4*sw} }
		| [d] + [d] { stroke: #95a; stroke-width: #{~~(3*sw)} }
		| [d] ~ [y] { font-style: italic }
		| tspan { font-size: .5em }
		| [d] + [d] ~ [y] { fill: #{tomato} }
	marker#e(markerWidth=ad markerHeight=ad 
						viewBox='0 -4 8 8' 
						orient='auto' refX='7')
		path(d='M8 0 0-4V4')
	//-radius text
	text(x=(-.5*(hrd)).toFixed(e) y=-(.5*hrd - .8*fs).toFixed(e)) R
	text(x=(.5*(hrd - fs)).toFixed(e) y=-(.5*hrd - .8*fs).toFixed(e)) R
	text(x=(-1.5*hrd).toFixed(e) y=(.5*hrd + .8*fs).toFixed(e)) R
	text(x=(.5*(3*hrd - fs)).toFixed(e) y=(.5*hrd + .8*fs).toFixed(e)) R
	text(x=(.5*(-3*hrd - .2*fs)).toFixed(e) y=-(.5*hrd + .2*fs).toFixed(e)) R
	text(x=(.5*(3*hrd - fs)).toFixed(e) y=-(.5*hrd + .2*fs).toFixed(e)) R
	//-coords
	text(x=(hrd - 3.2*fs).toFixed(e) y=(1.8*fs).toFixed(e)) (R/√2,0)
	text(x=(-hrd - 1.2*fs).toFixed(e) y=(1.8*fs).toFixed(e)) (-R/√2,0)
	text(x=(hrd + .4*fs).toFixed(e) y=-(2*hrd + .4*fs).toFixed(e)) (R/√2,-R·√2)
	text(x=(-(hrd + 6.6*fs)).toFixed(e) y=-(2*hrd + .4*fs).toFixed(e)) (-R/√2,-R·√2)
	text(x=(3*hrd - 1.2*fs).toFixed(e) y=(1.8*fs).toFixed(e)) (3·R/√2,0)
	text(x=(-(3*hrd + 4.8*fs)).toFixed(e) y=(1.8*fs).toFixed(e)) (-3·R/√2,0)
	//-axes
	path(d=`M${-(1.25*ax).toFixed(e)} 0H${(1.25*ax).toFixed(e)}`)
	text(x=(1.25*ax - .5*fs).toFixed(e) y=(-.5*fs).toFixed(e)) x
	path(d=`M0${-ay}V${(.85*ay).toFixed(e)}`)
	text(x=.4*fs y=(.85*ay - .2*fs).toFixed(e)) y
	//-helper circles
	circle(cx=-hrd r=hr)
	circle(cx=hrd r=hr)
	//-diameters
	path(d=`M${hrd}${-2*hrd}V0h${2*hrd}
					M${-hrd}${-2*hrd}V0h${-2*hrd}
					M${-2*hrd} ${hrd}V${-hrd}H${2*hrd}V${hrd}`)
	//-squares
	path(d=`M${hrd} 0
					l${-hrd}${-hrd} ${hrd}${-hrd} ${2*hrd} ${2*hrd}${-hrd} ${hrd}${-hrd}${-hrd} ${hrd}${-hrd}
					M${-hrd} 0
					l${hrd}${-hrd}${-hrd}${-hrd}${-2*hrd} ${2*hrd} ${hrd} ${hrd} ${hrd}${-hrd}${-hrd}${-hrd}`)
	//-points
	circle(cx=-hrd r=+pr2.toFixed(e))
	circle(cx=hrd r=+pr2.toFixed(e))
	circle(cy=-hrd r=+pr.toFixed(e))
	circle(cx=-2*hrd cy=-hrd r=+pr.toFixed(e))
	circle(cx=2*hrd cy=-hrd r=+pr.toFixed(e))
	circle(cx=-2*hrd cy=hrd r=+pr.toFixed(e))
	circle(cx=2*hrd cy=hrd r=+pr.toFixed(e))
	circle(cx=-3*hrd r=+pr1.toFixed(e))
	circle(cx=3*hrd r=+pr1.toFixed(e))
	circle(cx=-hrd cy=-2*hrd r=+pr1.toFixed(e))
	circle(cx=hrd cy=-2*hrd r=+pr1.toFixed(e))
	//-point names
	text(y=-(hrd + .5*fs).toFixed(e)) T
	text(x=(hrd - .4*fs).toFixed(e) y=fs.toFixed(e)) O<tspan>0</tspan>
	text(x=(-(hrd + .4*fs)).toFixed(e) y=fs.toFixed(e)) O<tspan>1</tspan>
	text(x=(2*hrd - .2*fs).toFixed(e) y=-(hrd + .4*fs).toFixed(e)) A<tspan>0</tspan>
	text(x=(-(2*hrd + .6*fs)).toFixed(e) y=-(hrd + .4*fs).toFixed(e)) A<tspan>1</tspan>
	text(x=(2*hrd - .2*fs).toFixed(e) y=(hrd + fs).toFixed(e)) B<tspan>0</tspan>
	text(x=(-(2*hrd + .6*fs)).toFixed(e) y=(hrd + fs).toFixed(e)) B<tspan>1</tspan>
	text(x=(hrd - .4*fs).toFixed(e) y=-(2*hrd + .4*fs).toFixed(e)) D<tspan>0</tspan>
	text(x=(-(hrd + 7.4*fs)).toFixed(e) y=-(2*hrd + .4*fs).toFixed(e)) D<tspan>1</tspan>
	text(x=(3*hrd - .4*fs).toFixed(e) y=fs.toFixed(e)) E<tspan>0</tspan>
	text(x=(-(3*hrd + .4*fs)).toFixed(e) y=fs.toFixed(e)) E<tspan>1</tspan>

// minimal SVG:
<svg viewBox='-1750 -997 3500 1750' xmlns='http://www.w3.org/2000/svg'><style>svg{fill:#333;font:84px consolas,monaco,monospace}svg>[d],[r]{fill:none;stroke:#ccc;stroke-width:7}[y]+[d]{stroke:#333;marker-end:url(#e)}[d]+[d]~[r]{fill:#f90;stroke:#333}[d]+[y],#e *{font:84px times new roman,serif}[r]+[d]{stroke:#f90;stroke-width:14}[d]+[d]{stroke:#95a;stroke-width:10}[d]~[y]{font-style:italic}tspan{font-size:.5em}[d]+[d]~[y]{fill:#b53}</style><marker id='e' markerWidth='7' markerHeight='7' viewBox='0 -4 8 8' orient='auto' refX='7'><path d='M8 0 0-4V4'/></marker><text x='-221' y='-154'>R</text><text x='179' y='-154'>R</text><text x='-663' y='288'>R</text><text x='621' y='288'>R</text><text x='-671' y='-238'>R</text><text x='621' y='-238'>R</text><text x='173' y='151'>(R/√2,0)</text><text x='-543' y='151'>(-R/√2,0)</text><text x='476' y='-918'>(R/√2,-R·√2)</text><text x='-996' y='-918'>(-R/√2,-R·√2)</text><text x='1225' y='151'>(3·R/√2,0)</text><text x='-1729' y='151'>(-3·R/√2,0)</text><path d='M-1538 0H1538'/><text x='1496' y='-42'>x</text><path d='M0-861V732'/><text x='34' y='715'>y</text><circle cx='-442' r='625'/><circle cx='442' r='625'/><path d='M442-884V0h884M-442-884V0h-884M-884 442V-442H884V442'/><path d='M442 0l-442-442 442-442 884 884-442 442-442-442 442-442M-442 0l442-442-442-442-884 884 442 442 442-442-442-442'/><circle cx='-442' r='9'/><circle cx='442' r='9'/><circle cy='-442' r='18'/><circle cx='-884' cy='-442' r='18'/><circle cx='884' cy='-442' r='18'/><circle cx='-884' cy='442' r='18'/><circle cx='884' cy='442' r='18'/><circle cx='-1326' r='13'/><circle cx='1326' r='13'/><circle cx='-442' cy='-884' r='13'/><circle cx='442' cy='-884' r='13'/><text y='-484'>T</text><text x='408' y='84'>O<tspan>0</tspan></text><text x='-476' y='84'>O<tspan>1</tspan></text><text x='867' y='-476'>A<tspan>0</tspan></text><text x='-934' y='-476'>A<tspan>1</tspan></text><text x='867' y='526'>B<tspan>0</tspan></text><text x='-934' y='526'>B<tspan>1</tspan></text><text x='408' y='-918'>D<tspan>0</tspan></text><text x='-1064' y='-918'>D<tspan>1</tspan></text><text x='1292' y='84'>E<tspan>0</tspan></text><text x='-1360' y='84'>E<tspan>1</tspan></text></svg>
            
          
!
            
              body {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	margin: 0;
	height: 100vh;
}

svg { display: block }
            
          
!
            
              // minimal SVG: https://codepen.io/thebabydino/pen/OxejWz?editors=1000
            
          
!
999px
Loading ..................

Console