A ProEssentials v10 WPF .NET 8 demonstration of a complete 3D subsurface visualization with animated roller-coaster style camera flythrough down multiple wellbore trajectories using Pe3doWpf and Direct3D.
A full implementation of Example 403 — 3D Surface with Custom Polygon Colors from the ProEssentials library, extended into a standalone wellbore visualization application.
Press keys 0–9 to fly down any of the wellbore trajectories.
The camera moves point-by-point along the selected well path while simultaneously rotating 1° per frame — producing a roller-coaster style descent through the subsurface. Press the same key again to return to the normal overhead view.
Key 0 — fly down well 0 (press again to exit)
Key 1 — fly down well 1
...
Key 9 — fly down well 9
This is implemented using SetViewingAt() — a ProEssentials Pe3doWpf
function that repositions the Direct3D camera to look at any 3D coordinate
in the scene:
// Each timer tick (25ms) advances one step along the well path
Pe3do1.PeFunction.SetViewingAt(x, y, z);
Pe3do1.PeAnnotation.Graph.HighLightAnnotationIndex = currentIndex;
Pe3do1.PeUserInterface.Scrollbar.DegreeOfRotation += 1; // spiral rotation
Pe3do1.Invalidate();The timer pauses automatically when the mouse is captured (drag rotation) to prevent a WPF threading conflict between the animation and user input.
- 200×200 grid extracted from a 1500×1500 real elevation dataset (
terrain2.bin) - A random region is selected each run — the terrain is different every launch
- Shaded surface with contour color scale (BlueCyanGreenYellowBrownWhite)
- Contour projection lines on the floor plane
- Concentric custom-colored rings painted using
PointColors[s,p] SurfaceNullDataGaps+NullDataValue=80creates a visible borehole void- Cyan polygon annotation marks the target zone boundary at surface
- Red ellipse annotations mark the target zone at depth (250ft, 500ft intervals)
- Multiple well paths loaded from
DirData1.txt(tab-delimited survey data) - Rendered as 3D tubes using
LinesOrTubes.AllTubes - White color markers indicate formation boundaries at depth intervals
- Each well labeled "Well 0", "Well 1"... at its terminal depth
Pe3doWpf — the ProEssentials Direct3D 3D chart object. Handles all
scene rendering, lighting, rotation, and camera management in hardware.
SetViewingAt(x, y, z) — repositions the Direct3D camera focus point
at runtime. Used here to drive the flythrough animation by moving the
camera along annotation coordinates each timer tick.
PointColors[s,p] — per-polygon color override. Paints individual
surface polygons with custom colors independently of the contour scale —
used to create the target bullseye rings on the terrain.
LinesOrTubes.AllTubes — renders all line-type graph annotations as
3D tubes with configurable thickness, dramatically improving visual quality
for wellbore paths in a 3D scene.
SurfaceNullDataGaps + NullDataValue — removes surface polygons
at grid points equal to the null value, creating the visible borehole void.
Graph Annotation Types used in this example:
MediumSolidLine/LineContinue— defines 3D polyline paths (well trajectories)StartPoly/AddPolyPoint/EndPolygon— closed polygon (target boundary)AxisDirection/MajorMinorRadii/EllipseMedium/EllipseThin— 3D ellipsesPointer— labeled pointer at well terminal depth
PeCustomTrackingDataText — custom tooltip for surface data points
(shows elevation value and grid coordinates).
PeCustomTrackingOtherText — custom tooltip for non-data hot spots.
Fires when hovering over well tube annotations (shows 3D XYZ coordinates).
CustomMenuText / PeCustomMenu — adds a custom item to the
right-click context menu with checkmark state — "Zoom Rotate on Center"
toggles between ViewingMode.Center and ViewingMode.DataLocation.
Freeze / Unfreeze — suspends rendering during initialization to
prevent partial renders flickering on screen during property setup.
Force3dxVerticeRebuild / Force3dxAnnotVerticeRebuild — forces
the Direct3D engine to recompute all vertex buffers on next render.
Required after programmatic annotation changes.
| Input | Action |
|---|---|
| Keys 0–9 | Fly down well 0–9 (press same key to exit) |
| Left drag | Rotate the 3D scene |
| Shift + drag | Translate / pan |
| Middle drag | Rotate the light source |
| Mouse wheel | Zoom in/out |
| Double-click | Start/stop auto-rotation |
| Right-click | Context menu |
| File | Contents |
|---|---|
terrain2.bin |
2,250,000 Int32 elevation values — 1500×1500 grid |
DirData1.txt |
Tab-delimited wellbore survey coordinates (Y/Z/X per row) |
Both files are copied to the output directory automatically on build.
- Visual Studio 2022
- .NET 8 SDK
- Internet connection for NuGet restore
1. Clone this repository
2. Open WellBoreChart.sln in Visual Studio 2022
3. Build → Rebuild Solution (NuGet restore is automatic)
4. Press F5
5. Press keys 0–9 to fly down wellbore trajectories
This project references
ProEssentials.Chart.Net80.x64.Wpf
from nuget.org. Package restore is automatic on build.
- WPF Quickstart — Simple Scientific Graph
- GigaPrime3D — 3D Surface Height Map
- Financial OHLC — Trading Signal Chart
- All Examples — GigasoftInc on GitHub
- Full Evaluation Download
- gigasoft.com
Example code is MIT licensed. ProEssentials requires a commercial license for continued use.
