{"name":"bezierInterpolation","operator":null,"title":"bezierInterpolation","type":"command","url":"https://community.bistudio.com/wiki/bezierInterpolation","revid":377844,"updated":"2026-01-03T04:36:03Z","groups":["Math"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.92"}],"since":{"game":"arma3","name":"Arma 3","version":"1.92"},"arma3_since":"1.92","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Gets interpolated value based on [Bézier curve](https://en.wikipedia.org/wiki/Bézier_curve) with given control points (progress value is 0...1 for a curve that starts at pos0 and finishes at posN)","syntaxes":[{"syntax":"progress bezierInterpolation positions","since":null,"effect":null,"exec":null,"params":[{"name":"progress","type":"Number","optional":false,"default":null,"description":"interpolation value","types":["Number"],"since":null,"text":"progress: Number - interpolation value"},{"name":"positions","type":"Array of Position3D","optional":false,"default":null,"description":null,"types":["Array","Position3D"],"since":null,"text":"positions: Array of Position3D"}],"returns":{"type":"Position3D","types":["Position3D"],"description":"based on progress value","text":"Position3D - based on progress value"},"form":"binary","operator":null,"left":{"text":"progress","types":["Number"]},"right":{"text":"positions","types":["Array","Position3D"]}}],"examples":[{"text":"Quick demonstration that spawns some spheres around player object:\n\n```sqf\nfor \"_i\" from 0 to 1 step 0.05 do {\n    createVehicle [\"Sign_Sphere10cm_F\", (_i bezierInterpolation [\n        player modelToWorld [0,0,0],\n        player modelToWorld [0,2,2],\n        player modelToWorld [2,0,2],\n        player modelToWorld [0,0,4]\n    ]), [], 0, \"CAN_COLLIDE\"];\n};\n```","code":["for \"_i\" from 0 to 1 step 0.05 do {\n\tcreateVehicle [\"Sign_Sphere10cm_F\", (_i bezierInterpolation [\n\t\tplayer modelToWorld [0,0,0],\n\t\tplayer modelToWorld [0,2,2],\n\t\tplayer modelToWorld [2,0,2],\n\t\tplayer modelToWorld [0,0,4]\n\t]), [], 0, \"CAN_COLLIDE\"];\n};"]},{"text":"Create a map marker curve from 4 control points with overlap (progress is -0.5...1.5 instead of 0...1):\n\n```sqf\nprivate _controlPoints = [[100,-90], [200,-30], [150,60], [100,90]] apply { player getRelPos _x };\n{\n    private _marker = createMarkerLocal [str _x, _x];\n    _marker setMarkerTypeLocal \"mil_objective\";\n    _marker setMarkerTextLocal (\"P\" + str _forEachIndex);\n}\nforEach _controlPoints;\n\nfor \"_i\" from -0.5 to 1.5 step 0.01 do\n{\n    private _marker = createMarkerLocal [str _i, _i bezierInterpolation _controlPoints];\n    _marker setMarkerTypeLocal \"mil_dot\";\n};\nopenMap true;\n```","code":["private _controlPoints = [[100,-90], [200,-30], [150,60], [100,90]] apply { player getRelPos _x };\n{\n\tprivate _marker = createMarkerLocal [str _x, _x];\n\t_marker setMarkerTypeLocal \"mil_objective\";\n\t_marker setMarkerTextLocal (\"P\" + str _forEachIndex);\n}\nforEach _controlPoints;\n\nfor \"_i\" from -0.5 to 1.5 step 0.01 do\n{\n\tprivate _marker = createMarkerLocal [str _i, _i bezierInterpolation _controlPoints];\n\t_marker setMarkerTypeLocal \"mil_dot\";\n};\nopenMap true;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["linearConversion","vectorLinearConversion"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Math","Introduced with Arma 3 version 1.92","Scripting Commands"]}