Skip to main content
OCCT category icon with a stylized logo representation

Creating Weighted Bezier Curves

Weighted Bezier curves give you precise control over how strongly each control point influences the curve's shape. Think of weights as invisible magnets attached to each control point - the heavier the weight, the more the curve gets pulled toward that point.

This example demonstrates the dramatic effect weights can have on curve shape. We start with five control points arranged in 3D space, then assign different weight values to each point. The middle control point receives the heaviest weight of 200, while the others get lighter weights ranging from 10 to 60.

The visual result shows three key elements that help you understand how weights work. The bright yellow curve represents the final weighted Bezier shape, dramatically pulled toward the middle point due to its high weight. A thin white polyline connects all the control points in order, showing you the basic path without any curve smoothing. Green spheres appear at each control point, with their sizes corresponding to the weight values - the larger the sphere, the stronger that point's influence on the curve.

Understanding the Weight Effect

When you run this example, you'll see how the curve bends strongly toward the middle control point. This happens because its weight of 200 is much higher than the surrounding points. The curve still passes through the general area of all control points, but it gets pulled most strongly toward the heavily weighted middle point, creating a distinctive bulge in that direction.

This technique is invaluable for design work where you need the curve to emphasize certain areas while maintaining smooth transitions. Automotive designers use weighted Bezier curves to ensure body panels flow correctly through critical styling points, while maintaining smooth surfaces elsewhere.

Bitbybit Platform

Bezier curves with different weight distributions

rete logoRete
Script Source (rete)
{
"id": "rete-v2-json",
"nodes": {
"d93ff9312fbaba0d": {
"id": "d93ff9312fbaba0d",
"name": "bitbybit.occt.shapes.wire.createBezierWeights",
"customName": "bezier weights",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"closed": false
},
"inputs": {
"points": {
"connections": [
{
"node": "71dc37e5bf31abc7",
"output": "list",
"data": {}
}
]
},
"weights": {
"connections": [
{
"node": "5e78ae53129348d2",
"output": "result",
"data": {}
}
]
}
},
"position": [
1474.6086829856026,
340.89493244534634
]
},
"6c71764f860388cb": {
"id": "6c71764f860388cb",
"name": "bitbybit.point.pointXYZ",
"customName": "point xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": -10,
"y": 0,
"z": 0
},
"inputs": {},
"position": [
233.46875,
142.23828125
]
},
"262c5b4158e10e7f": {
"id": "262c5b4158e10e7f",
"name": "bitbybit.point.pointXYZ",
"customName": "point xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": -5,
"y": 0,
"z": 3
},
"inputs": {},
"position": [
224.73046875,
479.984375
]
},
"aef87dde79aae140": {
"id": "aef87dde79aae140",
"name": "bitbybit.point.pointXYZ",
"customName": "point xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": 0,
"y": 7,
"z": -5
},
"inputs": {},
"position": [
224.74154154459637,
833.5904947916667
]
},
"6eb81a9d83fbbfe7": {
"id": "6eb81a9d83fbbfe7",
"name": "bitbybit.point.pointXYZ",
"customName": "point xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": 5,
"y": 0,
"z": 3
},
"inputs": {},
"position": [
242.77880556002404,
1187.0961686117394
]
},
"8f6ffca91f2b1d12": {
"id": "8f6ffca91f2b1d12",
"name": "bitbybit.point.pointXYZ",
"customName": "point xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": 10,
"y": 0,
"z": 0
},
"inputs": {},
"position": [
255.1210077869103,
1528.317664158235
]
},
"71dc37e5bf31abc7": {
"id": "71dc37e5bf31abc7",
"name": "bitbybit.lists.createList",
"customName": "create list",
"data": {},
"inputs": {
"listElements": {
"connections": [
{
"node": "6c71764f860388cb",
"output": "result",
"data": {}
},
{
"node": "262c5b4158e10e7f",
"output": "result",
"data": {}
},
{
"node": "aef87dde79aae140",
"output": "result",
"data": {}
},
{
"node": "6eb81a9d83fbbfe7",
"output": "result",
"data": {}
},
{
"node": "8f6ffca91f2b1d12",
"output": "result",
"data": {}
}
]
}
},
"position": [
809.4944869050374,
791.4060121932632
]
},
"5e78ae53129348d2": {
"id": "5e78ae53129348d2",
"name": "bitbybit.json.parse",
"customName": "parse",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"text": "[10,60,200,30,10]"
},
"inputs": {},
"position": [
820.9003613826357,
1045.8565882239327
]
},
"1badef86dffd3d2b": {
"id": "1badef86dffd3d2b",
"name": "bitbybit.vector.max",
"customName": "max",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
}
},
"inputs": {
"vector": {
"connections": [
{
"node": "5e78ae53129348d2",
"output": "result",
"data": {}
}
]
}
},
"position": [
1452.8517350042941,
1584.36307724802
]
},
"6628a0dad5393c00": {
"id": "6628a0dad5393c00",
"name": "bitbybit.vector.min",
"customName": "min",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
}
},
"inputs": {
"vector": {
"connections": [
{
"node": "5e78ae53129348d2",
"output": "result",
"data": {}
}
]
}
},
"position": [
1453.5379674005778,
1314.9458583914063
]
},
"708bd3fd447df194": {
"id": "708bd3fd447df194",
"name": "bitbybit.polyline.create",
"customName": "polyline",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"isClosed": false
},
"inputs": {
"points": {
"connections": [
{
"node": "71dc37e5bf31abc7",
"output": "list",
"data": {}
}
]
}
},
"position": [
1470.8643520387145,
15.655298073315691
]
},
"02f75fd91278ddf0": {
"id": "02f75fd91278ddf0",
"name": "bitbybit.math.remap",
"customName": "remap",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"number": 0.5,
"fromLow": 0,
"fromHigh": 1,
"toLow": 0.3,
"toHigh": 0.9
},
"inputs": {
"number": {
"connections": [
{
"node": "a1d8b49442cfbed2",
"output": "result",
"data": {}
}
]
},
"fromLow": {
"connections": [
{
"node": "6628a0dad5393c00",
"output": "result",
"data": {}
}
]
},
"fromHigh": {
"connections": [
{
"node": "1badef86dffd3d2b",
"output": "result",
"data": {}
}
]
}
},
"position": [
2340.141780945838,
1415.6477847941433
]
},
"a1d8b49442cfbed2": {
"id": "a1d8b49442cfbed2",
"name": "bitbybit.lists.flatten",
"customName": "flatten",
"data": {
"nrLevels": 1
},
"inputs": {
"list": {
"connections": [
{
"node": "5e78ae53129348d2",
"output": "result",
"data": {}
}
]
}
},
"position": [
1842.606441779354,
1082.6783355134344
]
},
"594b69638201ab5d": {
"id": "594b69638201ab5d",
"name": "bitbybit.occt.shapes.solid.createSphere",
"customName": "sphere",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": true,
"flatten": 0,
"forceExecution": false
},
"radius": 1,
"center": [
0,
0,
0
]
},
"inputs": {
"center": {
"connections": [
{
"node": "1acceaf1728a9bb6",
"output": "result",
"data": {}
}
]
},
"radius": {
"connections": [
{
"node": "02f75fd91278ddf0",
"output": "result",
"data": {}
}
]
}
},
"position": [
2802.6462312888184,
788.517960703051
]
},
"1acceaf1728a9bb6": {
"id": "1acceaf1728a9bb6",
"name": "bitbybit.lists.flatten",
"customName": "flatten",
"data": {
"nrLevels": 1
},
"inputs": {
"list": {
"connections": [
{
"node": "71dc37e5bf31abc7",
"output": "list",
"data": {}
}
]
}
},
"position": [
1844.9251455808178,
867.378536261973
]
},
"9e4757c9a3030d87": {
"id": "9e4757c9a3030d87",
"name": "bitbybit.draw.drawAnyAsync",
"customName": "draw any async",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
}
},
"inputs": {
"entity": {
"connections": [
{
"node": "594b69638201ab5d",
"output": "result",
"data": {}
}
]
},
"options": {
"connections": [
{
"node": "ffb4da8064c6349b",
"output": "result",
"data": {}
}
]
}
},
"position": [
3404.609864091567,
786.0901195986705
]
},
"ffb4da8064c6349b": {
"id": "ffb4da8064c6349b",
"name": "bitbybit.draw.optionsOcctShapeSimple",
"customName": "options occt shape simple",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"precision": 0.05,
"drawFaces": true,
"faceColour": "#37ff00",
"drawEdges": false,
"edgeColour": "#ffffff",
"edgeWidth": 2
},
"inputs": {},
"position": [
2813.0669683419205,
1228.3267499707356
]
},
"5d978b01fc903574": {
"id": "5d978b01fc903574",
"name": "bitbybit.draw.drawAnyAsync",
"customName": "draw any async",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
}
},
"inputs": {
"entity": {
"connections": [
{
"node": "d93ff9312fbaba0d",
"output": "result",
"data": {}
}
]
},
"options": {
"connections": [
{
"node": "8da0996b9ae76bc7",
"output": "result",
"data": {}
}
]
}
},
"position": [
2648.015406962442,
129.78266326628432
]
},
"8da0996b9ae76bc7": {
"id": "8da0996b9ae76bc7",
"name": "bitbybit.draw.optionsOcctShapeSimple",
"customName": "options occt shape simple",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"precision": 0.05,
"drawFaces": false,
"faceColour": "#000000",
"drawEdges": true,
"edgeColour": "#e4ff1a",
"edgeWidth": 10
},
"inputs": {},
"position": [
2249.0695731821565,
364.8567725172626
]
}
}
}