Published
Edited
Jan 13, 2019
6 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// customFun = (x, y, z) => Math.max(Math.abs(x), Math.abs(y), Math.abs(z)) - 0.2
customFun = (x, y, z) => Math.max(Math.abs(x) - 0.3, Math.abs(y) - 0.3, Math.abs(z) - 0.3, - (1 + x * x + y * y + z * z) / 2 + 0.57)
Insert cell
Insert cell
Insert cell
Insert cell
downloadBook({
cellSize: 5,
fov: 39,
dist: 1.4,
alpha: 35.0,
beta: 20,
rows: 50,
cols: 77,
iterCount: 15,
formula: `MIN(
MAX(
ABS(x) - 0.3, ABS(y) - 0.3, ABS(z) - 0.3,
-SQRT(POWER(x, 2) + POWER(y, 2) + POWER(z, 2)) + 0.375
),
SQRT(POWER(SQRT(POWER(x - 0.25, 2) + POWER(z - 0.25, 2)) - 0.25, 2) + POWER(y, 2)) - 0.05
)`,
// fname: 'cube.xlsx', // uncomment this and evaluate for download
})
Insert cell
downloadBook({
cellSize: 5,
fov: 39,
dist: 1.0,
alpha: 35.0,
beta: 20,
rows: 50,
cols: 77,
iterCount: 15,
formula: `MIN(
SQRT(POWER(SQRT(POWER(x, 2) + POWER(z, 2)) - 0.3, 2) + POWER(y - 0.18, 2)) - 0.02,
SQRT(POWER(x, 2) + POWER(y, 2) * 2.5 + POWER(z, 2)) - 0.4,
MAX(
x + y - 0.15 - 0.05 - 0.5,
- (y) + 0.19 - 0.1,
SQRT(POWER(SQRT(POWER(x - 0.55, 2) + POWER(y - 0.09, 2)) - 0.1, 2) + POWER(z - 0.1, 2)) - 0.04
),
MAX(
-(- (y) + 0.19 - 0.1),
SQRT(POWER(SQRT(POWER(x - 0.35, 2) + POWER(y - 0.09, 2)) - 0.1, 2) + POWER(z - 0.1, 2)) - 0.04
),
SQRT(POWER(x, 2) + POWER(y - 0.27, 2) + POWER(z, 2)) - 0.05
)`,
// fname: 'teapot.xlsx', // uncomment this and evaluate for download
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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