We have read that Euclidean is good for numerical data and clusters with spherical shape, I want to know what distance measures can be used to detect rectangular, or diamond shaped clusters [in the context of kmeans]. Regards.
A 1-norm is good for diamond shapes, i.e. ||(x,y)||=|x|+|y|. Euclidean is just a 2-norm. For rectangular use the max or infinity norm ||(x,y)||=max{|x|,|y||. I don't recall the code but p can be chosen as a parameter in the norm function. However, these are designed for diamonds/rectangles oriented a particular way so upon visual inspection you may need to rotate the data before using these. In the end, all norms in finite dimensional space are equivalent so this will only be advantageous for large dimensions if there is evidence that such shapes are inherent to the problem.
Instead of giving you a short answer, I will try to explain the intuition behind the spherical shape of clusters with the Euclidean distance.
In the end, all the cluster analyses depend on two elements. The similarities/dissimilarities and the cluster method. I think that your question is more about the properties of similarities/dissimilarities than about the final cluster. In fact, even if you use the same measure (similarities/dissimilarities), your clusters could be quite different depending on the cluster method. For example, try simple linkage vs complete linkage with the Euclidean distance.
If we focus on the Euclidean distance, the spherical property is quite intuitive. Imagine that you are flying over a city, and you want to know what interesting points are less than 1km away, you make a circumference around you with radius 1km because you can go in straight lines to those points. If you want to cluster the potential destinations using that distance, you know that any increase in the distance implies an increase in all directions, in other words, an increase of the radius of that circumference. That is why the Euclidean distance has a spherical shape.
However, the city-block distance is different. Imagine that you are in the middle of Manhattan. In this case, you have to take into account the buildings, you cannot cross most of them. You have to walk in straight lines, and then make a left (right) turn to reach your destination. If you are in the 5th ave, and you want to know what interesting points are less than 1km away by walking, then you form a diamond in the map. The upper and bottom parts are the same than the Euclidean distance because you can walk straight. But, in the rest of the cases, you walk a straight line in one direction, then you turn in another direction, and you keep walking until your destination. If you repeat that process, you form triangles with respect to the Euclidean distance, and if you add all the points at 1km away from you using the city block, you have an almost-diamond-shape cluster.
Lastly, let me apologize for the long answer. I hope it will be useful for someone.