On the face of it, keeping fluids contained seems like a simple job. Your fridge alone probably has a dozen or more trivial examples of liquids being successfully kept where they belong, whether it’s the plastic lid on last night’s leftovers or the top on the jug of milk. But deeper down in the bowels of the fridge, like inside the compressor or where the water line for the icemaker is attached, are more complex and interesting mechanisms for keeping fluids contained. That’s the job of seals, the next topic in our series on mechanisms.
Of all the things evolution has stumbled across, the eye is one of the most remarkable. Acting as sort of a ‘biological electromagnetic transducer’, the eye converts incoming photons into electrical and chemical spikes, known as action potentials. These spikes then drive the brain of the host life form. Billions of years of natural selection has produced several types of eyes, with some better than others. It would be an honest mistake to think that the human eye is at the top of the food chain, as this is not the case. Mammals underwent a long stint scurrying around in dark caves and crevasses, causing our eyes to take a back seat to other more important functions, such as the development of a cortex.
There are color sensitive cones in all eyes. Mammals have three types of cones, which are…wait for it…Red, Blue and Green. Our red and green cones are relatively recent on the evolutionary timescale – appearing about 30 million years ago.
The way these cones are distributed around our eyes is not perfect. They’re scattered around in lumpy, uneven patterns, and thus give us an uneven light sampling of our world. Evolution simply has not had enough time to optimize our eyes.
There is another animal on this planet, however, that never went through “the dark ages” as mammals did. This animal has been soaring high above its predators for over 60 million years, allowing its eyes to reach the pinnacle of the natural selection process. A bald eagle can spot a mouse from over a mile away. Birds eyes have 5 types of light sensitive cones – red, blue and green like our own. But add in violet and a type of cone that can detect no light, or black. But it is the way these cones are distributed around the bird’s eye that is most fascinating, and the subject of today’s article.
Reading (or writing!) Hackaday, we find that people are often solving problems for us that we didn’t even know that we had. Take [Jack Qiao]’s SVGnest for instance. If you’ve ever used a laser cutter, for instance, you’ve probably thought for a second or two about how to best pack the objects into a sheet, given it your best shot, and then moved on. But if you had a lot of parts, and their shapes were irregular, and you wanted to minimize materials cost, you’d think up something better.
SVGnest, which runs in a browser, takes a bunch of SVG shapes and a bounding box as an input, and then tries to pack them all as well as possible. Actually optimizing the placement is a computationally expensive proposition, and that’s considering the placement order to be fixed and allowing only 90 degree rotations of each piece.
Once you consider all the possible orders in which you place the pieces, it becomes ridiculously computationally expensive, so SVGnest cheats and uses a genetic algorithm, which essentially swaps a few pieces and tests for an improvement many, many times over. Doing this randomly would be silly, so the routine packs the biggest pieces first, and then back-fills the small ones wherever they fit, possibly moving the big ones around to accommodate.
That’s a lot of computational work, but the end result is amazing. SVGnest packs shapes better than we could ever hope to, and as well as some commercial nesting software. Kudos. And now that the software is written, as soon as you stumble upon this problem yourself, you have a means to get to the solution. Thanks [Jack]!