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

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more