This project demonstrates a 3D visualization of wellbore trajectories using Three.js. It utilizes advanced rendering techniques and interactive controls to display geological survey data in a comprehensive and intuitive manner.
- 3D Line Rendering: Visualize wellbore paths using
Line2
,LineGeometry
, andLineMaterial
from Three.js. - Interactive Controls: Rotate, zoom, and pan the camera using
OrbitControls
. - Labels and Markers: Display labels and markers at specific points along the wellbore path using
CSS2DRenderer
. - Axes and Ground Plane: Include axes for orientation and a ground plane for better spatial understanding.
-
Clone the repository:
git clone https://github.com/khiemnd777/3d-trajectory-visualizer.git
-
To install dependencies:
bun install
-
To run:
bun run server.ts
This project was created using bun init
in bun v1.1.18. Bun is a fast all-in-one JavaScript runtime.
- Open
http://localhost:3000
in a web browser to view the visualization.
- Rotate: Click and drag to rotate the scene.
- Zoom: Scroll to zoom in and out.
- Pan: Right-click and drag to pan the scene.
/project-root
├── src
│ ├── main.js // Main entry point
│ ├── threejs-setup.js // Three.js setup and utility functions
│ ├── calculations.js // Wellbore trajectory calculations
├── index.html // HTML file with import map
├── styles.css // Optional CSS for styling
└── README.md // Project documentation
Contributions are welcome! Feel free to submit a pull request or open an issue.
This project is licensed under the BSD 2-Clause License. See the LICENSE file for details.
- Three.js documentation and examples for providing comprehensive resources and inspiration.