Why are lenses round in shape although the image sensor is not? Why they can not be square or something matching the shape of image sensor?
Sensors are rectangular by tradition, based on the historically traditional shape of image media.
But there is a technology/business decision that drives them to be rectangular, also. Sensors are rectangular because they are made using semiconductor fabrication techniques. These techniques call for “printing” multiple sensor circuits onto a silicon wafer. Today these wafers can be 300 mm in diameter and manufacturers are moving toward 450 mm diameter (see here). A lot of sensors can be printed on wafers that large.
Sensors are tiled onto the wafer to efficiently use the space available and in a way that makes them easy to cut apart into “dies” (or the individual sensors, in this case). The process is called dicing. The most cost effective shape for dies is rectangular. Usually a saw or scribe is used to cut the wafers in straight lines. Imagine if the dies (sensors in this case) were supposed to be round (a wasteful and costly use of the material) or hexagonal (efficient use of the material but the cuts are not straight across the whole wafer). (See here for more info.)
B) Lenses made of high quality glass are generally ground using lathes. (This can be seen in this video. Watch around the 7:00 minute mark in particular. Sorry, it's in Japanese, but the video is very fascinating and revealing.) It is easier to spin, grind, and polish a round lens in these machines because there are no edges to catch on the tooling as the lens spins around. It also is consistent with the optical symmetry they are trying to achieve in the finished lens.
Lenses that are not round would generally be cut from round lenses, a step that adds cost to the production of the lens assembly. Lenses don’t need to be round. For heaven’s sake, most eyeglasses are not round! When your eyeglasses are made, you must be aware that the lens maker isn’t stocking a lens for every shape of eyeglass frame. He’s cutting or grinding round lenses to fit the frame.
Once the lens manufacturer has his round lenses, what would motivate him to cut it into a different shape? As many people have pointed out in various forums, the lens shape does not determine the image shape or quality (apart from diffraction caused by edges, which can be mitigated, and some second order aberration effects, maybe), and for the most part, every point on the lens can gather light from every point on the object and focus each point on the image plane. I’ve already pointed out that changing the shape of the lens adds cost. There really isn’t any practical reason (generally) for changing the shape.
There are a lot of reasons why a lens is produced round:
From the side of the manufacturer, it is easier and cheaper to manufacture spherical lens and easier to calibrate when you combined different lens to achieve a unique feature, e.g. macro, telephoto etc...
For the general users, most of us will definitely agree to say that it is more convenient to rotate circular lens than rectangular. Inside camera lenses, especially zoom lenses, some elements must adjust mostly by rotating (cheaper lenses) as you focus or zoom them. Rotating a non-circular lens is going to be tricky if you are also trying to control the orientation of the aberrations and diffraction spikes at the same time.
Trying to curve something flat is harder than making a curve of something round.
For the wide angle lenses, it has spherical shape to give better and wider perspective.
To focus on light with varying distance, it requires a circular lens as all points of light need to be focused on the same general area.
To produce images achieving maximum resolution (sharpness) the lens surface must be accurate to very high precision for the lens to deliver full resolution - small fractions of a wavelength of light. The grinding and polishing processes are only assured of producing lenses of the desired accuracy for circular lenses; it is extremely difficult though not impossible to achieve this accuracy for other shapes.
The most desirable properties of a lens are its ability to form sharp images without artifacts, and light gathering power especially in dim lighting. Both of these properties are maximized by circular lenses; only someone absolutely ignorant of optics theory would attempt to design any other shape.
One more reason: The light gathering capability is largely governed by the area, whereas some of the optical quality goes down (or it is more expensive to correct to the same level) with the maximum dimension. A circle minimizes the maximum dimension for a particular area.
Despite that, manufacturing concerns are the overriding reason. Fortunately, a circular lens is what you want for other reasons anyway.
A funny point is that the shape of the aperture (thus of the lens) affects the apparent shape of an out-of-focus light source (often called "bokeh"). You can see that looking at the custom bokeh images (http://www.wikihow.com/Make-a-Custom-Bokeh).
Well, lenses are not always "round" in shape. However that has nothing to do with photography. Here are some examples:
Cylindrical lenses are very useful for some applications of 1-D cameras and beam astigmatism correction, as well as beam shaping.
Fresnel lenses, can come in many shapes, and are used for focusing light with twist. see for example : https://commons.wikimedia.org/wiki/File:Magnifying-fresnel-lens.jpg
there are several more esoteric types of lenses, (lenslet arrays, kinoform lenses, etc..) But what is important to remember is that a lens is used to bend light, and there are many ways to do that using "diffractive" optics or tranditional glass like material. The reason for the design is usually functionality and production cost.
Let's say you use a rectangular lens rather than a cylindrical one. First off, the shape of the lens won't matter at all unless you have the aperture all the way open; on any slower setting, the approximately circular shape of the diaphram will be the determining factor. Assuming that you do have the aperture all the way open, the main effect will be as follows. You will have a certain depth of field. If object point A is at the correct distance to produce a pointlike image, then this point is still a point regardless of the rectangular shape of the lens. However, if object point B is at some other distance, we get a blur as the image of that point. The blur occurs because there is a bundle of light rays, and the bundle has some finite size where it intersects the film or chip. Since the lens is rectangular, this bundle is pyramidal, and the blur will be a rectangular blur rather than the usual circular one. For example, say you're photographing someone's face with a starry sky in the background. You focus on the face. The stars will appear as little fuzzy rectangles.
At very high magnifications (maybe with a very long lens that's effectively a small telescope), it's possible that you would also see diffraction patterns. In the example of the face with the starry background, suppose that we change the focus to infinity, putting the face out of focus. Wave optics would now predict that (in the absence of aberrations), the diffraction pattern for a star would be a central (order 0) fringe surrounded by a ring (first-order fringe) if you used a circular aperture, but a rectangular aperture would give a different pattern (more like a rectangular grid of fringes). In practice, I don't think a camera would ever be diffraction-limited with the aperture all the way open. Diffraction decreases as the aperture gets wider, while ray-optical aberrations increase, so aberration would dominate diffraction under these conditions.
Lenses were always being produced as rounded because it fits the manufacturing process the best. Making them square would involve at least very precise cutting afterwards, so that would make them much more expensive. (However square lenses are being produced for some special purposes)
You could ask why the sensor is square rather then round?
The answer to that is that our screens, film and in the end our photo paper is square in shape. We do not need round sensor if we need square photos!
Surely the point is
to apply the same 'operation' to light coming in at any orientation you need a circularly symmetrical shape in order that you don't distort the spacial ratios between different points on the incoming image
lenses generally aim to concentrate light landing on their surface towards a single point. That point is 'slightly behind' the CMOS sensor in a camera, but its the same principle, and physics dictates that a lense cross-section shape achieves that. When you repeat it in all orientations you rotate around and get a flat-dome shape, like a lense
It's a similar reason to why satellite dishes are domed and not box-shaped
but it's definitely not because it's easier to manufacture. Raindrops and glass-balls have a lense-effect. Windows don't. Cubes and boxes of refractive material just don't have that effect.
Lenses don't have to be round. Look at the variety of shapes in which eyeglass frames appear.
However, all those lenses are a section cut from a stock lens which has spherical surfaces (ignoring, for a moment, lenses which correct for astigmatism).
And there is basically the answer. Any sort of assymetry would give your camera astigmatism: the inability to bring a point into focus vertically and horizontally at the same time.
A lens must provide a consistent focus along any rotational axis. If two parallel beams of light that are one cm apart horizontally hit the lens, they must focus at the same distance as two parallel beams which are one cm apart vertically.
Aside from creating really odd Bokkeh, a rectangular lens would also worsen the lens's vignetting and create asymmetrical resolution over the image area amongst other negative optical aberration effects. The light that is hitting any particular point on the sensor has come from a wide swath of glass - the light that's hitting a corner of the sensor didn't travel exclusively through the corresponding corner area of the lens elements on its way to the sensor (unless you consistently choose such small aperture that diffraction itself is substantially degrading image quality). Lens manufacturers go to great lengths to ensure that everything is symmetrical for the purpose image quality, even including the diaphragm. Low quality lenses may have a few aperture blades with flat edges making a very angular pentagon or hexagon iris...this can have a measurably negative effect on a lens's MTF chart (a measure of a lenses resolving capability) even in the center of the image. Move to better quality lenses and you'll find much more symmetrically round diaphragm opening...the apertures on those higher end multi-thousand dollar lenses that Canon & Nikon put out have very round diaphragms - that's just the aperture...do that to the glass and you'll be degrading the image that much more. The truly high end ($ 5-digit) lenses in cinematography have circular. Lens elements. This is all for the image quality throughout whole image area from center to corner. Regardless of whether the sensor is square, rectangular, round, or even star or crescent shaped, the lens - at least a really good one - would continue to be symmetrical (aka circular). Yes, manufacturing ease/cost and structural concerns would be adversely affected and complicated by making rectangular lenses, but image quality, THAT is why lenses are circular.
It's difficult to explain without launching into a complete explanation of quantum electrodynamics, but all of the light that reaches the sensor "goes through" all of the lens, at least in a sense, even if we're just talking about a single photon. A photon doesn't take just one path (unless you make the mistake of trying to figure out which path it took), it takes all possible paths. Weird, but true.
That means that removing glass from a round lens to make a smaller rectangle isn't removing "extra" glass that isn't being used, it would actually be removing glass that is used for imaging (and light collection). By the same token, adding extra glass to make the lens rectangular for purely cosmetic reasons would not only involve a lot of extra expense, that "extra" glass would now also contribute to the imaging probability distribution, so it would need to be as accurately made and as well corrected as the circular lens you are extending. As I've explained here, the larger (faster) you make a lens, the more correction is needed, the more accuracy is required, and the more the price will rise.
Quite apart from that, though, the bokeh (the nature of the out-of-focus areas, particularly the highlights) would look really, really bad.
This is about the controversial idea that all parts of the image front will collect rays for every pixel.
Diffuse surfaces send ray into every direction, pretty much infinite rays within the small arc that hits the lens. These infinity rays must be directed from a point source to a single pixel. This is hard to do, which is why sharp lenses are hard to find. This is another story.
I shot 3 images wide open and then covered the unused parts with a cut paper rectangle and took 3 more, and saw that the center part was 15% darker when I covered the unused part. the top image is the uncovered one and below is the covered one and as you see the covering is not seen in the frame, it just makes the image 15% darker:
It can be explained in the simplest model of geometric optics. On the object occurs diffuse reflection which may be depicted as several light rays of different brightness in all directions. A larger lens diameter (instead of a smaller rect. shape) may result in a brighter picture.
Q: "Why are lenses round in shape although the image sensor is not? Why they can not be square or something matching the shape of image sensor?".
A: Lenses and other round objects are round because it is easier to rotate them (yes, I am aware of the "Square Wheel Video" by Mythbusters). A round Lens is easier to grind precisely compared to a square Lens (like an Anamorphic). It has one less dimension to worry about (creating or aligning) or in the case of a perfectly square Lens it has a bigger Image Circle.
A cheap Lens can be mass produced by Injection Molding with enough accuracy to be a cheap Lens, thus Lenses could easily be any shape from long to round.
Expensive Glass is just that, expensive. Some Cameras used for capturing light outside the visible spectrum have Lenses made from exotic materials, not glass, and are difficult to work with. Less work without loss of quality saves money.
Most Sensors (today) are rectangular (16:9) because human vision 'works' side to side (scanning the horizon) and not up and down (it used to be that upwards had little to see and beneath you was never far away so our brains developed that way) - the size 16:9 was chosen as a Standard because it gives a preferred 'widescreen format' (I know that there are great Films that are wider than 16:9 and usually Anamorphic Lenses were used).
Along with the ease and cost considerations of round Lenses we have the Square Sensor. Sensors have flat edges and are not round because it's easier to cut them straight (and Sensors are not polished like Lenses).
Sensors are square because it gets the most out of the round Wafer from which they are made. Wafers are round because they are sliced from an Ingot. Ingots are tubular because that's how they grow.
So to make everything cost the least the Lenses are round and the Sensors are square (like the single huge Sensors used in Space, one Sensor per Wafer with dead pixels mapped; just like the early days of LCD Screens).
BUT it isn't tough to cut rectangular Sensors (16:9) assuming you would want to cut up your lovely super high resolution, large pixel, Sensor into little pieces (because people don't want to pay over $100K for a Sensor unless they are the Government).
So they chop most Sensors to a 16:9 shape with a smaller number cut to 4:3 (because those Cameras have expensive Lenses) and the 16:9 format people live with a tiny bit of vignetting (occasionally a lot) and waste a portion of the comparatively low cost Glass in order to get aesthetically pleasing shaped images (only a square or nerd wants a Sensor that operates outside of the visible spectrum, or produces a square image or matrix of Data points).
The 16:9 format is simply a widening of the 3:2 aspect ratio of 35 mm film from which modern photography developed, other formats came and went or never gained popularity, even if they were 'better' (but possibly cost prohibitive in some of the largest formats).
Basically: Lineage, Cost, Quality. Sometimes common sense played a role also.