https://github.com/xaliphostes/kelper-lit
iso contours on 3d surfaces
https://github.com/xaliphostes/kelper-lit
isocontours isolines marching surface three
Last synced: 3 months ago
JSON representation
iso contours on 3d surfaces
- Host: GitHub
- URL: https://github.com/xaliphostes/kelper-lit
- Owner: xaliphostes
- Created: 2025-02-20T13:47:22.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-02-20T14:23:34.000Z (3 months ago)
- Last Synced: 2025-02-20T15:31:01.984Z (3 months ago)
- Topics: isocontours, isolines, marching, surface, three
- Language: TypeScript
- Homepage:
- Size: 173 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Three.js with iso-contours on 3D triangulated surfaces
![]()
# Usage
```ts
import { Surface, generateIsoValues } from "kelper-lit"const vertices: number[] = ... ;
const indices : number[] = ... ;const zCoord = vertices.filter((_, index) => index % 3 === 2);
const surface = new Surface(vertices, indices, scene)
surface.generateIsos({
attribute : zCoord,
isoList : generateIsoValues(zCoord, 20), // 20 iso-contours
lut : 'Blackbody',
viewFilled : true,
viewLines : true
})
```## Install
```bash
git clone https://github.com/xaliphostes/kelper-lit.git
npm install
```## Serve
```bash
npm run serve
```## Visualize
Then open [this link](http://localhost:8000/web)## See
- https://github.com/Fennec-hub/three-viewport-gizmo
- https://fennec-hub.github.io/three-viewport-gizmo/examples/yomotsu-camera-controls.html?type=sphere
-
- https://github.com/yomotsu/camera-controls