RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Editor AI TestsEditor AI VisualizationEditor – Assembly Spline ToolAsset BrowserAsset DeduplicatorAsset Management ToolSFX Previewer (Audio Events List)Audio Ribbon EditorAutoSaveBarriers EditorBiome ToolBuilding EditorBulk RenameCamera BookmarksCamera TransformCamera Path EditorCEF HelperCo-Simulation Signal EditorCrawl Data EditorCreate Object ToolDataBlock EditorDecal EditorDecal Spline EditorDocumentation HelperDrag Race EditorDrift Data EditorDrive Path EditorDynamic Decals Tool (Vehicle Livery Creator)Engine Audio DebugExtensions DebugExtensions EditorFFI Pointer Leak TestFile DialogFlowgraph EditorForest EditorForest ViewEditor Gizmo HelperEditor Ground Model Debug HelperEditor Headless Editor TestEditor Icon OverviewEditor ImGui C DemoEditor InspectorEditor Layout ManagerEditor Level SettingsEditor Level ValidatorEditor LoggerEditor Log HelperEditor MainEditor Main MenuEditor Main ToolbarEditor Main UpdateMap Sensor EditorMaster Spline EditorMaterial EditorMeasures Inspector HeaderMesh Editor (Base)Mesh Road EditorMesh Spline EditorMission EditorMission PlaybookMission Start Position EditorMulti Spawn Manager (Vehicle Groups)Navigation Mesh EditorEditor News MessageObject Tool (Object Select Edit Mode)Object To Spline EditorParticle EditorPerformance Profiler / Camera RecorderPhysics ReloaderPrefab Instance EditorEditor PreferencesRace / Path EditorRally EditorRaycast Test Editor ToolRenderer Components Editor ToolRender Test Editor ToolResource Checker Editor ToolRiver EditorRoad Architect EditorRoad DecorationsRoad Editor (Decal Road)Road Network ExporterRoad River Cache HandlerRoad River GUIRoad Spline EditorRoad Template EditorRoad UtilitiesScene TreeScene ViewScreenshot Creator BootstrapScript AI EditorScript AI ManagerSensor Configuration EditorSensor DebuggerShape EditorShortcut LegendSidewalk Spline EditorSites EditorSlot Traffic EditorSuspension Audio DebugTech Server ManagerTerraform ToolTerrain And Road ImporterTerrain EditorTerrain Materials EditorText EditorTool ManagerTool ShortcutsTraffic DebugTraffic ManagerTraffic Signals EditorUndo History ViewerVehicle Bridge TestVehicle Detail ViewerVehicle Editor MainEditor - VisualizationEditor Viz HelperEditor Water Object HelperEditor Windows Manager
Road Architect - ClothoidRoad Architect - DecalsRoad Architect - ExportRoad Architect - GeometryRoad Architect - GroupsRoad Architect - ImportRoad Architect - JunctionsRoad Architect - LinkRoad Architect - OverlaysRoad Architect - ProfilesRoad Architect - RenderRoad Architect - Road MeshRoad Architect RoadsRoad Architect - Static MeshRoad Architect - Static Mesh ManagerRoad Architect - TerraformRoad Architect - Tunnel MeshRoad Architect Utilities

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API ReferenceGE ExtensionseditortechroadArchitect

Road Architect - Clothoid

Provides clothoid (Euler spiral) fitting for road nodes. Computes smooth curvature-continuous transitions between road segments using Fresnel integrals, with support for arc length parameterization an

Provides clothoid (Euler spiral) fitting for road nodes. Computes smooth curvature-continuous transitions between road segments using Fresnel integrals, with support for arc length parameterization and lateral offset computations.


Public Functions

FunctionSignatureDescription
M.evaluate(...)Evaluates clothoid curve

Example: Clothoid Curve Fitting

local clothoid = require('editor/tech/roadArchitect/clothoid')

-- Fit a clothoid through three road nodes
local p1 = vec3(0, 0, 0)
local p2 = vec3(50, 30, 0)
local p3 = vec3(100, 10, 0)

local hdg1 = clothoid.computeHeading(p1, p2)
local hdg2 = clothoid.computeHeading(p2, p3)

local cData = clothoid.fitClothoid(p1, p2, p3, hdg1, hdg2)

-- Sample the clothoid into a polyline (100 points)
local polyline = clothoid.computeClothoidPolyline(cData, 100)

-- Get arc length
local length = clothoid.getClothoidLength(cData)

-- Compute a point offset laterally (e.g., lane edge)
local offsetPt = clothoid.clothoidLateralOffset(cData, length * 0.5, 3.5)

-- Fresnel integral for custom calculations
local S, C = clothoid.fresnelIntegral(1.0, 10)

Notes

  • Clothoids provide curvature-continuous transitions (no sudden steering changes)
  • Used internally by the road geometry module for smooth road curves
  • Fresnel integrals computed via truncated power series (configurable terms)

Functions

evaluate(start, theta0, kappa, dKappa, p)

Handles evaluate.

  • start (any)
  • theta0 (any)
  • kappa (any)
  • dKappa (any)
  • p (any)

Returns: self

Functions

evaluate(start, theta0, kappa, dKappa, p)

Handles evaluate.

  • start (any)
  • theta0 (any)
  • kappa (any)
  • dKappa (any)
  • p (any)

Returns: self


See Also

  • Road Architect - Decals - Related reference
  • Road Architect - Export - Related reference
  • Road Architect - Geometry - Related reference
  • World Editor Guide - Guide

Sites Editor - Zones

Sub-editor for managing zone polygon elements within the Sites Editor. Supports vertex selection/manipulation, plane editing, terrain snapping, and polygon-based containment testing.

Road Architect - Decals

Manages road surface decals (lane markings, arrows, patches) for the Road Architect. Creates, positions, and manages DecalRoad and MeshRoad Torque objects along lane edges and surfaces.

On this page

Public FunctionsExample: Clothoid Curve FittingNotesFunctionsevaluate(start, theta0, kappa, dKappa, p)Functionsevaluate(start, theta0, kappa, dKappa, p)See Also