Tutorial: Render a Well Log
Tracks, curves, LAS parsing and layout
You will build: a multi-track well log canvas. Time: about 15 minutes. Prerequisites: Beep.Skia and Beep.Skia.WellLogs.
1. Canvas and tracks
WellLogCanvas owns the depth range and the track list; WellLogTemplates provides ready-made track sets (gamma ray, resistivity, density, neutron, sonic).
using Beep.Skia;
using Beep.Skia.WellLogs;
var manager = new DrawingManager();
var canvas = new WellLogCanvas
{
X = 40, Y = 40, Width = 900, Height = 520,
DepthFrom = 1000, DepthTo = 1500
};
manager.AddComponent(canvas);
2. Data
LAS 2.0/3.0 files parse into curve data plus the well header; the renderer draws curves, fills and lithology patterns.
// var log = LasParser.Parse(File.ReadAllText("well.las"));
// canvas.SetCurves(log.Curves);
// canvas.SetHeader(log.Header);
manager.RequestRedraw();
3. Layout and rendering
WellLogLayoutEngine computes track widths, headers and depth grids; WellLogRenderer draws them with the brush library.
// The canvas runs the layout engine internally on resize and depth changes.
// Brush patterns come from WellLogBrushLibrary (sandstone, shale, limestone, ...).
Next steps
- Well logs family — tracks, curves and templates
- Performance — large logs render per-track with culling