Public
Edited
Jan 5, 2024
Insert cell
Insert cell
Insert cell
Insert cell
await visibility(), (() => {
const scene = new ln.Scene()
const n = 15
let y = 0;
for( var x = -n*1.5; x <=n*1.5; x++) {
y += 1;
let shape = new ln.Cube(new ln.Vector(0, y, 0), new ln.Vector(1, y+1, 1))
scene.add(shape)
}

const offset = .5;
const eye = new ln.Vector(10, 0, cam_y)
const center = new ln.Vector(0,0,0)
const up = new ln.Vector(0, 0, -1)

const r = 7.5;
scene.add( new ln.OutlineSphere( center, up, new ln.Vector(-offset,n+(r*2),r/2), r*2) )


const width = 512*1.5
const height = 512
const paths = scene.render(eye, center, up, width, height, 90, 1, 100, 0.01)
return svg`${ln.toSVG(paths, width, height)}`


})()
Insert cell
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