Notebooks 2.0 is here.

Public
Edited
Dec 1, 2023
Insert cell
Insert cell
Insert cell
await visibility(), (() => {
const sin = Math.sin;
const cos = Math.cos;
const abs = Math.abs;
function shape(x, y) {
return -1.5 + (cos( (x*.2) + x**2 + y**2))
}

const size = 8
const scene = new ln.Scene()
const min = new ln.Vector(-size, -size, -size)
const max = new ln.Vector(size, size, size)
const box = new ln.Box(min, max)
const fn = new ln.Function(shape, box, ln.Direction.Above)
scene.add(fn)

const eye = new ln.Vector(0, -7, -5)
const center = new ln.Vector(0, -3.8, 0)
const up = new ln.Vector(0, 1, 0)
const w = width * .5;
const height = w * .704;
const paths = scene.render(eye, center, up, w, height, 80, 0.1, 30, 0.01)
return svg`${ln.toSVG(paths, w, height)}`
})()
Insert cell
Insert cell
Insert cell
Insert cell
plotpartyPostcards = FileAttachment("plotparty-postcards.jpg").image()
Insert cell
ln = import('https://unpkg.com/@lnjs/core@0.5.0/es/index.js?module')
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