Skip to main content

Interface: DensityGrid

Defined in: src/mobjects/molecular/DensitySurface.ts:62

A scalar density sampled on a regular 3D grid.

Properties​

dims​

dims: [number, number, number]

Defined in: src/mobjects/molecular/DensitySurface.ts:66

Grid size per axis [nx, ny, nz]. Each must be a positive integer.


origin?​

optional origin: Vector3Tuple

Defined in: src/mobjects/molecular/DensitySurface.ts:68

World position of voxel (0, 0, 0)'s center. Default: [0, 0, 0].


spacing?​

optional spacing: Vector3Tuple

Defined in: src/mobjects/molecular/DensitySurface.ts:70

World size of one voxel step per axis. Default: [1, 1, 1].


values​

values: number[]

Defined in: src/mobjects/molecular/DensitySurface.ts:64

Flat sample array, length nx * ny * nz, index x + nx * (y + ny * z).