Published
Edited
Apr 25, 2018
11 stars
Insert cell
Insert cell
PGA2D = (await require('ganja.js'))(2,0,1)
Insert cell
Insert cell
P2 = PGA2D.inline
Insert cell
graph = PGA2D.graph.bind(PGA2D)
Insert cell
Insert cell
wobble = { var c=0; while(1) yield Math.sin(c++/50); }
Insert cell
Insert cell
a=P2`1e1+${wobble+2}*1e2+1e0`
Insert cell
b=P2`1e1-${wobble}*1e0`
Insert cell
Insert cell
ab = P2`${a}^${b}`
Insert cell
Insert cell
graph([a,"a",b,"b",ab,"a^b"])
Insert cell
Insert cell
P2T = a=>a.toString().replace(/_(\d+)/g,"_{$1}")
Insert cell
md `So that you could write

${tex`a \wedge b = ${P2T(ab)}`}

and include multivectors in pretty TeX output.`
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