# Why do computer graphics applications use piecewise polynomial curves of degree 3 rather than curves of higher-order, say degree 100?

just wondering why is that? can't get my head around it. wouldn't the use of degree 100 be better? I'm really new to this stuff.

• The more math you have to do, the longer it takes. Cubic Beziers are perfectly adequate for visualization. Jul 9, 2021 at 23:03

the higher the degree the more parameters you have to tweak. For example for a 100 point bezier curve there are 100 points to tweak and each point affects every part of the entire bezier curve, a piecewise curve lets you localize any tweaks you want to make.

The higher degree the more intricate the calculations, degree 100 in a polynomial equation means you need to raise a number to the 100th power. This can lead to numeric instability or those terms are meaningless anyway.

A cubic polynomial has enough flexibility to give you a curve match on transitions between adjoining curve. This is good enough that you can hide the transition between subsequent bits in.

You use whatever fits the job.

If you need code to do arbitrary degree in term of Bézier curves, here it is:

// https://stackoverflow.com/questions/785097/how-do-i-implement-a-bézier-curve-in-c
vector_4 getBezierPoint(vector<vector_4> points, float t)
{
size_t i = points.size() - 1;

while (i > 0)
{
for (size_t k = 0; k < i; k++)
{
points[k].x += t * (points[k + 1].x - points[k].x);
points[k].y += t * (points[k + 1].y - points[k].y);
points[k].z += t * (points[k + 1].z - points[k].z);
points[k].w += t * (points[k + 1].w - points[k].w);
}

i--;
}

return points[0];
}

• The picture seems irrelevant to the question and to the answer .. Jul 12, 2021 at 5:51
• I’ll delete the picture. Jul 12, 2021 at 16:56