Switchback · The Flattest Path Laboratory
之字路 · 最平路线实验室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.
每爬升 1 米相当于多走 16 米平路:沿等高线之字蜿蜒,主动避开险坡。1 meter of climb equals 16 meters extra walking: winding along contours to avoid sheer cliffs.
每一个散点都代表一条在距离与爬升综合考量下无可超越的最优路线。点击图中散点可直接切换至对应方案。Every dot is a route nothing else beats on both counts. Click any dot on the frontier curve to inspect its route.
📈路线地形剖面图 (Elevation Profile)Route Elevation Profile
在剖面图上滑动悬停,可在上方地图中同步查看对应的实时地形位置与瞬时坡度。Hover across the profile to trace the elevation curve and inspect the matching spot on the map.
🏔️山路寻径的智慧:三种典型的路线哲学Three Topographic Philosophies: Distance vs Effort
纯直线翻山越岭,遭遇令人窒息的断崖陡坡。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.
沿山脊等高线蜿蜒,以适量距离代价换取舒适平缓的坡度。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.
宁愿绕远多走几倍平路,也绝不向上多爬升 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.


