Published
Edited
Oct 21, 2020
Fork of SDF tracer
1 fork
2 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
mp = p => {
p = p.clone();
// rotation of the shape
p
.applyAxisAngle(new THREE.Vector3(0,1,0).normalize(), sceneRotationX)
.applyAxisAngle(new THREE.Vector3(1,0,0).normalize(), sceneRotationY)

//sphere
// return p.length()-200
// torus
let q = new THREE.Vector2(new THREE.Vector2(p.x, p.y).length()-120,p.z)
return q.length()-60
}
Insert cell
time = {
let time = 0
while (true) {
yield time+=1
await Promises.tick(1000)
}
}
Insert cell
Insert cell
THREE = require("three@0.89.0/build/three.min.js")
Insert cell
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