Published
Edited
Dec 10, 2020
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
frag = fragHead + fragBody
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
//sphereTextureImage = image_from_URL(await FileAttachment("1_earth_8k.jpg").url())
sphereTextureImage = image_from_URL("https://1.bp.blogspot.com/-a8f5kAODTgg/T56O2B4awaI/AAAAAAAAAhM/mWd3ps0i_rI/s1600/metal1_notile.png")
Insert cell
sphereTexture = regl.texture({
data: sphereTextureImage,
flipY: true,
wrap: 'repeat',
min: 'mipmap',
mag: 'linear'
})
Insert cell
cubeTexture = regl.cube(planeTextureImage, planeTextureImage, planeTextureImage, planeTextureImage, planeTextureImage, planeTextureImage);
Insert cell
Insert cell
molObject = FileAttachment("Molecule-7.json").json()
Insert cell
molecules = [molObject.Ethanol, molObject.Aspirin, molObject.Caffeine, molObject.Nicotine, molObject.LSD, molObject.Cocaine, molObject.Cholesterol, molObject.Lycopene, molObject.Copper, molObject.Fluorite, molObject.Glucose, molObject.Salt, molObject.YBCO_superconductor, molObject.Buckyball, molObject.Graphite, molObject.Aluminium_oxide, molObject.Cubane];
Insert cell
balls = new Float32Array(molecules[Scenes.molSelect].quadruples);


Insert cell
800/4
Insert cell
Insert cell
Insert cell
Insert cell
size = balls.length/4
Insert cell
color_size = colors.length/4;
Insert cell
Spheres = regl.texture({
width: size,
height: 1,
data: balls,
type: 'float',
min: 'nearest'
});
Insert cell
Colors = regl.texture({
width: color_size,
height: 1,
data: colors,
type: 'float',
min: 'nearest'
});
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
circleCenterY = (1/2)*height;
Insert cell
Insert cell
occluderRadius = 30
Insert cell
occluderCenterY = 200
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
lens_x = (5/20)*width;
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
d3 = require('d3@6');
Insert cell
import {slider,checkbox,select, color, radio, button} from "@jashkenas/inputs"
Insert cell
import {columns} from "@bcardiff/observable-columns"
Insert cell
import {mutableForm} from '@mootari/mutable-forms'
Insert cell
Insert cell
Insert cell
Insert cell
geometric = require("geometric@2");
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