Circle detector to render roundabouts and building parts smootly

First have a look at the picture below. Do you not the difference? The rendering is done by OSM tagging only. It’s the tower and dome of St.Pauls in London. Do you see the domes soft shape and the engines of the column below?

A GPU can only show triangles. But the material may be flat or smoothed do a soft sphere, depending whether you use separate or common vertexes at the edges. My new project can do both. I use edges, if the osm way of a dome/onion/phyramide has up to 8 nodes. An onion roof often wants to be edgy, a big dome used to be really rounded. Do you think, 8 is a good limit?

A nice dome, isn’t it? But now the column below looks not nice, unrealistic. “Soon” a “circle detector” will be added and the column will get the same soft skin. Does anyone have a code for cycle detection?

At the lower side of the pic are a ring of columns. They have 15+1 nodes! Isn’t it a bit much vor our OSM data base? Well, the whole 3D building tagging more artwork but useful. May be for shadow simulation etc. And the www.3dmr.eu will be a better way for complex buildings.

Anyway, we have quite a lot cyclic ways in OSM. We could have a new type of building:part - as a node! With radius=12m and edges=4 or 12 or “rounded”. All editors could handle such a node, but not show the real cycle - until they get extended. And I don’t only thing for 3D. We have a lot of oil tanks etc on the 2D map too. Proposal? Hm?

But all 2D rendere and all editors could have a “circle detector” and show them as a smooth circle. I bet, the user would set les nodes, just to tag for the renderer aiming a nice circular view.

An onion roof often wants to be edgy, a big dome used to be really rounded.

indeed, and the same issue exists with lines, we do not have a tag (anymore I should add, because there once was a osmarender:smooth=yes or similar tag) to tell whether an angle in the geometry is actually an approximation for a curve or is meant to be “edgy”.

For building parts‘ its easy.
Me and Tobias considered to render railway tracks softened. There are strong rools from the rail companes to relay on too.
Streets and path are realy difficult. Define bezier curve tagging?
There are renderer, rounding roads, mostly nice or realy wrong.
We could define/tag nodes as „hard“ and „soft“ to help.
Not an easy way.

One more thin king:
One asked: Is it possible to define roof types?

No, roof types have to be coded in the renderer manually. What syntax would you use? What type is missing?

But may be - in my code, onion, dome and pyramid are the sme code but get a shape: just a list if height and radius. If you add the shape as list in the tag value, you get individual roofs

roof:type = shape:0.0,1.0;0.5,0.7;1.0,0.3:1.0,0.0

And: Yes!: circular ways are softened now.
“circular detection” was easy: the radius of all nodes must be about equal, maximal 10 % differences at the moment. And at last 10 nodes, to be a circle. How does it look, compared with the first version above?

That will not always fit. The limits will become parameters of the lib. So you even could switch of options like this.

Look at that part, the arrow is pointing to. No soft corners. It is cyclic with 4 squares on each side. But as it is tagged as one single way. It is not detectable as circular. That could be edited to refine the building. Not for the renderer! That part is a compromise anyway, to have not to much detail tagging.

Try it. find the way of a building, you like to check, put the way-id in the url, like this:
https://www.osmgo.org/bevy.html?way=109862851

Is your building is correctly rendered and edged?