Texturing top of cylinder vs flat disc I am trying to create a transparent gradient texture for the top of a cylinder / disc / ring.
So far I have used this node configuration that is basically using the mathematical formula sqrt(x^2+y^2) to get the radius as it is explained here RADIAL Colorramp gradient texture

It is working good when the object is a cylinder that has been reduced the Z scale to a minimum so it looks like a disc/ring as it can be seen here:

However, the same material is not working right if the object is a disc created from a extruded circle (from the vertex). Nevertheless, if I change the power to another negative value, the material starts to work although not exactly how I want as it can be seen here:

I guess this has to do with the UV coordinates each object has internally generated but I cannot figure this. Why is this happening?
Also I am open to use another more simple approach than this nodes configuration.
You're using Object coordinates, which, (assuming your object is not scaled in Object Mode,) are measured in Blender units, from the object's origin, along the object's own axes.
If your disc has a radius of 1, then you can simplify your tree as follows:

Since the answer you refer to, there's a Vector Math &gt; Length node, so you don't have to do your own Pythagoras any more, and you could use alpha in your color-ramp colors to get rid of the shader-mix? It depends on the exact shading you want.
If the radius of your circle is not 1, then you could introduce a Vector Math &gt; Multiply before the Length, to bring the radius lengths into the 0-1 range for the color-ramp to handle.. multiplying X and Y by whatever is needed, and Z by 0 to get rid of it.
However, you want the texture to be more general, and occupy the same proportions of a disc, no matter what size it is, you could use Generated coordinates, which are always measured 0-1 from the minimum to the maximum of an object's bounding-box in all directions, no matter what size the object is.
In that case, you would have to shift 0 back to the middle of the circle, and multiply by 2 to get the radius mapped back to 0-1 again:...