JanetRossini.github.io

Lua, LSL, Blender, Python in Second Life


Project maintained by JanetRossini

Quality of Approximation

Jun 21, 2025 • [designluamoverstesting]


My current guess is that we’ll approximate Bezier curves with a polyline representation created by following the control points of 8 sub-curves of the original. Here’s a picture of the accuracy of that approximation.

I used SuzannaLinn’s SVG object example code, from her advanced SLua class to create these pictures. It was rather easy and had I not been just hacking them together, it would have been easier still. Good stuff, Suzanna!

Partitions: 0, Segments: 3 Partitions: 1, Segments: 6 Partitions: 2, Segments: 12 Partitions: 3, Segments: 24 Approximation of Curve by Control Points of Sub-Curves

Here’s another example:

Partitions: 0, Segments: 3 Partitions: 1, Segments: 6 Partitions: 2, Segments: 12 Partitions: 3, Segments: 24 Approximation of Curve by Control Points of Sub-Curves

Looks pretty good to me. We’ll have to test it on actual track of course, but I think it’s going to be just fine.

Safe paths!