Published
Edited
Dec 8, 2020
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
diagonal = d3.linkHorizontal().x(d => d.y).y(d => d.x)
Insert cell
tree = d3.tree().nodeSize([dx, dy])
Insert cell
dx = 16
Insert cell
dy = width / 7
Insert cell
d3 = require("d3@5")
Insert cell
margin = ({top: 10, right: 120, bottom: 10, left: 40})
Insert cell
fbdr = (alg) => {
const height = 150
// const url = `http://162.243.158.198:8000/visualcube.php?fmt=svg&r=y30x-24&size=150&co=30&fo=90&cc=ccc&stage=fbdr&sch=white,22bb22,red,white,blue,grey&alg=${alg}`
const url = `http://162.243.158.198:8000/visualcube.php?fmt=svg&r=y30x-24&size=200&co=33&fo=100&cc=ccc&bg=444&stage=fbdr&sch=ffffff,22bb22,red,white,blue,grey&alg=${alg}`

return html`<img height=${height} src=${url}></img>`
}
Insert cell
fbdr`R'U'RrF`
Insert cell
fbdr`R'`
Insert cell
{
let cases = `F2 U F' r2 F' U' R' U'
R F' M2 U' F' R2 U' F'
R2 F' M U2 F2 U' F' U'
D' F2 D F' U' R2 F' U'
D' F2 D F R2 U' F2 U2
D R D2 F' D U R' U'
F' M' F' R F' U' F' U'
R D R' D' F' R' F' U'`;
cases = cases.split('\n').map(x => x.replace(/ /g, "")).map(fbdr);
let div = html`<div>`
cases.forEach(c => div.appendChild(c));
return div
}
Insert cell
fbdr`F2UF'r2F'U'R'U'`
Insert cell
{
let cases = `F M U' r2 U2 F2 U' F'
R F' M2 R' U' R2 F' U'`;
cases = cases.split('\n').map(x => x.replace(/ /g, "")).map(fbdr);
let div = html`<div>`
cases.forEach(c => div.appendChild(c));
return div
}
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more