Published
Edited
Oct 24, 2019
1 fork
15 stars
Insert cell
Insert cell
Insert cell
viewof sides = html`<INPUT TYPE=RANGE MIN=2 MAX=10 VALUE=3>`
Insert cell
(await require('ganja.js'))(3, 0, 1).inline((sides, width) => {
const { E, PI } = Math;
var camera = new Element(),
f = (x, y) =>
E ** (x * PI * 1e12) *
E ** .7e01 *
E ** ((x / sides + y) * PI * 1e13) *
E ** 0.2e01;
[f.dx, f.dy] = [200, sides + 1];
return this.graph(
() => (
camera.set(E ** 1e03 * E ** (performance.now() * .0003e13)), [0xff4d6d, f]
),
{ camera, gl: 1, animate: 1, width: `${width}px`, height: "750px" }
);
})(sides, width)
Insert cell
Insert cell
(await require('https://unpkg.com/ganja.js@1.0.152'))(3, 0, 1).inline((sides)=>{
const {E, PI} = Math;
var camera = new Element(), f = (x)=>E**(x*PI*sides*1e12) * E**.7e01 * E**(x*PI*1e13) * E**0.2e01;
f.dx=sides*64;
return this.graph(()=>(camera.set(E**1e03 * E**(performance.now()*.0003e13)),[0xff4d6d, f]),
{camera, gl:1, animate:1, width:"800px", height:"750px" });
})(sides)
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