# Smoothing Algorithm

I’ve noticed when creating flowing natural curves (NURBs) that the smoothing algorithm doesn’t quite make the curve “smooth”. There is still a distinct sharper bend near the node, with a smoother curve in between. I find myself editing nearly all of these nodes & making the tangent vectors longer.

I’d like to suggest doubling the smoothing factor. I’m trying to think of a situation where this would not be good, or where the current algorithm would be better. I can’t.

I created some tests & analyzed the curves in the ascii V6 files. It looks like the tangent magnitude is around 0.28 when smoothing from a sharp (non-smooth) corner. I think it should be more like double that, or 0.56.

As an example, Make a circle of radius 1. Select the circle & Edit Nodes. Select all of the nodes, and hit the “S” key to remove the smooth condition. Now hit “S” again to restore the smooth condition. It’s no longer a circle, but more of an oblong square. ??? I would expect it to look very close to a circle again. I’m not saying it should return to it’s original state, as it could have started out as the oblong square.
In our 1R circle, after smoothing the tangent vectors are about 0.276 long. If we increase them to 0.552, the curve is now very close to a circle.

4 Likes

This would be nice. If I did what you explained in this example about smoothing and then smoothing again, I would have to add more nodes to get get the lines to form a circle again. I have had pics that I traced and the program took circles and added square nodes in them. Then when I go into edit nodes and I want to adjust these circles some, I have to smooth the square node to a smooth node and then adjust by adding more nodes into it to get the proper rounded design that I am going for. This is where a lot of my programming and design work eats up a lot of my time.

Even with more points it still doesn’t smooth to a circle.

Another issue with smoothing is… If you select all the points & hit “S”, it toggles all the points. If the point was smooth, it’s now sharp. If the point was sharp, it’s now smooth.
It would be nice if there were a way to make them all smooth (or sharp) even if they were mixed to begin with.

The basic principles for drawing smoothly w/ Bézier curves are:

• Rule of 30 — unless some aspect of the shape requires otherwise an off-curve node should reach EDIT: at least ~1/3rd to 30% of the way towards the opposing on-curve node
• nodes should be at the extrema — top/bottom-most or left/right-most edges
• nodes should appear at points of inflection (think the middle of an S curve)

See:

for a bit on this.

1 Like

Yeah, but what I usually have to do is grab the stretch lines of the nodes and increase them to create more radius to the node point. I could more then likely do the same to the original 4 nodes of the circle and create the circle as close to the original as possible. I’m not saying this fixes the issue with the node smoothing to a smaller radius. Once editing nodes comes into play then things can get a little tricky.

I have this one project I did that had a ton of design editing needed done to it. I worked on it for days. There were times where I smoothed out a square node or made a square node where a circle node was, and looked back over the whole design and realized nodes further down the design that were a part of this node edit also had changed. Was pretty frustrating to work on an area and then go to another area that was also connected to the previous area, zoom in and make adjustments, to them zoom out and look back over the first adjustments and see the lines all messed up like being crossed over each other. So, I would go back and re-adjust. I just figured it was part of the beast of the program.

So the current algorithm is using the “Rule of 27.6”, which is kinda close to 30.
I would argue that the “Rule of 30” does not create the smoothest curve if I’m understanding it correctly.

The smoothest curve I can create through 4 radially symmetrical points (the corners of a square for example), would be a circle. If you create a circle, it uses the “Rule of 55”

Most other curve creating software allows you to adjust the radius of curvature, or the tangent magnitude, as well as the degree of a curve being created. CC locks it down to 1 choice when smoothing. I think the most practical “Rule” would be the “Rule of 55” for smoothing.

Even with much more complex curves, if you use the smoothing function, the curve is not what I would call ‘smooth’. It has the “Rule of 30” curvature, which has a tighter radius near the node, and a looser radius between the nodes.

It’s a guideline for expressiveness, and I would argue is probably expressed as the minimum.

Why then, would the minimum be the default? I get there is an actual minimum, where the tangent magnitude is 0, resulting in a sharp corner. And a maximum, where the curve starts to wrinkle or self-intersect. Seems it would make more sense to use the ‘average’ or ‘median’ than the ‘minimum’

And again, there may be situations where the “rule of 30” applies. I haven’t encountered one.
Nearly every time I’ve used smoothing, I have to go through & make all of the tangent vectors (handles) a little bit longer to get an actually smooth curve.

If I make a curve through these 5 points, which one is “smoother”??

If I actually wanted the shape of the top curve, I would use more points or shorten the handles.

1 Like