Switchback · The Flattest Path Laboratory

Daily LabPareto Topography · 2026

之字路 · 最平路线实验室Switchback · The Flattest Path Lab

在山地城市出行中,纯几何最短的直线往往逼迫行人和骑手翻越陡峭的绝壁。现实中的登山步道与盘山公路,会利用「之字折返」(Switchbacks)沿等高线斜切,以多走平路的代价换取平缓的坡度。In hilly cities, the shortest straight-line route often forces walkers and cyclists up punishing slopes. Mountain roads and trail switchbacks make a deliberate trade-off: traveling farther horizontally to maintain a comfortable, manageable grade.

本实验室在程序化山丘地貌上运行加权 Dijkstra 最短路算法。拖拽起点(A)与终点(B),调节爬升惩罚系数 λ,实时探索距离与爬升的帕累托最优前沿(Pareto Frontier)。This laboratory runs weighted Dijkstra pathfinding across procedural hillshade terrain. Drag Start (A) and Finish (B), adjust the climb penalty λ, and explore the Pareto frontier trading off distance against total elevation gain.

寻路预设:Presets:
爬升惩罚系数Climb Penalty Factorλ = 16.0

每爬升 1 米相当于多走 16 米平路:沿等高线之字蜿蜒,主动避开险坡。1 meter of climb equals 16 meters extra walking: winding along contours to avoid sheer cliffs.

Cost = Distance + λ × ElevationGain
Dijkstra · 8-connected grid
0 (不计坡度Pure Distance)1 (轻度避坡Gentle)16 (舒适骑行Balanced)60 (强力避坡Strong)200 (宁绕勿爬Max Flat)
总路程Total Distance
--m
vs 最短: +0m (+0%)
累计爬升Elevation Gain
--m
vs 最短: -0m (-0%)
最大坡度Max Grade
--%
缓和路段Gentle slope
之字折返次数Switchback Turns
0次折返turns
沿坡面蜿蜒盘旋Contour winding
🟢 起点 A (可拖拽)Start A (Draggable)🔴 终点 B (可拖拽)Finish B (Draggable)
坡度:Slope: 0-4% 4-8% 8-12% >12%
双峰山口与中央马鞍谷 · 3.2km × 2.4km
🎯帕累托最优前沿Pareto Frontier
Distance vs Climb

每一个散点都代表一条在距离与爬升综合考量下无可超越的最优路线。点击图中散点可直接切换至对应方案。Every dot is a route nothing else beats on both counts. Click any dot on the frontier curve to inspect its route.

当前方案:Current:λ = 16.0
前沿有效采样:Sampled routes:12 组路线

📈路线地形剖面图 (Elevation Profile)Route Elevation Profile

在剖面图上滑动悬停,可在上方地图中同步查看对应的实时地形位置与瞬时坡度。Hover across the profile to trace the elevation curve and inspect the matching spot on the map.

悬停检视:Hover:-- m▲ -- m--%

🏔️山路寻径的智慧:三种典型的路线哲学Three Topographic Philosophies: Distance vs Effort

🏃
几何最短 (Shortest: λ = 0)Direct Euclidean (λ = 0)

纯直线翻山越岭,遭遇令人窒息的断崖陡坡。Straight-line ascent: blindly scales steep peaks, tackling punishing inclines.

算法完全不顾坡度代价,哪怕是 25% 的绝壁也照直冲上去。距离虽短,但行人和骑手的体力消耗成倍激增,在真实世界中难以通行。Ignores topography entirely. While horizontal distance is minimized, climbing energy scales brutally, rendering it impractical for everyday commuters.

⚖️
之字折返 (Switchback: Balanced)Balanced Switchback

沿山脊等高线蜿蜒,以适量距离代价换取舒适平缓的坡度。Traversing contour lines: trading modest distance for gentle, sustainable grades.

土木工程与登山步道的黄金标准。通过「之字形」盘旋或寻找山坳垭口,将陡坡拆解为舒适的 4%~7% 缓坡,总耗能处于帕累托最优平衡点。The gold standard of mountain engineering. Winding back and forth keeps heart rates steady and pedal cadence smooth, hitting the true Pareto sweet spot.

🚲
极致避坡 (Flattest: λ = 200)Flattest Detour (λ = 200)

宁愿绕远多走几倍平路,也绝不向上多爬升 1 米。Zero-climb priority: detouring around valleys to eliminate vertical ascent.

完全避开山体,沿着谷底洼地或外围平原大范围迂回。将爬升降至物理极限,极其适合重载骑行、轮椅通行或推婴儿车漫步。Bypasses hills altogether by hugging riverbeds and coastal lowlands. Ideal for cargo bikes, strollers, and wheelchair accessibility.


灵感来源:flattensf.com(2026-10-06 HN 首页)Inspired by: flattensf.com (HN front page, Oct 6 2026)
本页面由 AI 生成。Generated by AI.
Table of Contents

No table of contents on this page

Table of Contents

No table of contents on this page