Scene — crystal lattice (3D)
A 3×3×3 chunk of a simple cubic lattice, rendered isometrically. Typed FlowScript for 3-D scene composition. Keywords: 3D, scene, isometric.
Make it your own.
// A 3×3×3 chunk of a simple cubic lattice, rendered isometrically.
// Atoms are spheres, bonds are implicit (edges along principal axes).
scene cubic_lattice {
title: "Simple cubic lattice — 3×3×3 unit cells"
projection: isometric
width: 760
height: 540
grid: true
axes: true
}
sphere3d { x: 0 y: 0 z: 0 r: 0.35 fill: "#6366f1" }
sphere3d { x: 1 y: 0 z: 0 r: 0.35 fill: "#6366f1" }
sphere3d { x: 2 y: 0 z: 0 r: 0.35 fill: "#6366f1" }
sphere3d { x: 0 y: 0 z: 1 r: 0.35 fill: "#6366f1" }
sphere3d { x: 1 y: 0 z: 1 r: 0.35 fill: "#6366f1" }
sphere3d { x: 2 y: 0 z: 1 r: 0.35 fill: "#6366f1" }
sphere3d { x: 0 y: 0 z: 2 r: 0.35 fill: "#6366f1" }
sphere3d { x: 1 y: 0 z: 2 r: 0.35 fill: "#6366f1" }
sphere3d { x: 2 y: 0 z: 2 r: 0.35 fill: "#6366f1" }
sphere3d { x: 0 y: 1 z: 0 r: 0.35 fill: "#8b5cf6" }
sphere3d { x: 1 y: 1 z: 0 r: 0.35 fill: "#8b5cf6" }
sphere3d { x: 2 y: 1 z: 0 r: 0.35 fill: "#8b5cf6" }
sphere3d { x: 0 y: 1 z: 1 r: 0.35 fill: "#8b5cf6" }
sphere3d { x: 1 y: 1 z: 1 r: 0.35 fill: "#8b5cf6" }
sphere3d { x: 2 y: 1 z: 1 r: 0.35 fill: "#8b5cf6" }
sphere3d { x: 0 y: 1 z: 2 r: 0.35 fill: "#8b5cf6" }
sphere3d { x: 1 y: 1 z: 2 r: 0.35 fill: "#8b5cf6" }
sphere3d { x: 2 y: 1 z: 2 r: 0.35 fill: "#8b5cf6" }
sphere3d { x: 0 y: 2 z: 0 r: 0.35 fill: "#a855f7" }
sphere3d { x: 1 y: 2 z: 0 r: 0.35 fill: "#a855f7" }
sphere3d { x: 2 y: 2 z: 0 r: 0.35 fill: "#a855f7" }
sphere3d { x: 0 y: 2 z: 1 r: 0.35 fill: "#a855f7" }
sphere3d { x: 1 y: 2 z: 1 r: 0.35 fill: "#a855f7" }
sphere3d { x: 2 y: 2 z: 1 r: 0.35 fill: "#a855f7" }
sphere3d { x: 0 y: 2 z: 2 r: 0.35 fill: "#a855f7" }
sphere3d { x: 1 y: 2 z: 2 r: 0.35 fill: "#a855f7" }
sphere3d { x: 2 y: 2 z: 2 r: 0.35 fill: "#a855f7" }
label3d { text: "a" x: 1 y: -0.4 z: 0 color: "#dc2626" }
label3d { text: "c" x: 0 y: -0.4 z: 1 color: "#2563eb" }
view lattice: scene(cubic_lattice)