Linux Fu: The Windows X11 Connection

The life of a Linux user can be a bit difficult. Sometimes you have to — or want to — run Windows. Why Windows? Sometimes you have a work computer or a laptop that Linux doesn’t support well. Or it might be software. Although there are plenty of programs that can edit, say, Word documents, there’s always that one document that doesn’t quite translate correctly. Things like videoconferencing software sometimes works on Linux but might have fewer features.

So what do you do? You can dual boot, of course, but that’s not very handy. You can run Windows in a virtual machine if you have enough horsepower. There’s also Wine, but that often has its own set of problems with features and stability of complex programs. However, recent versions of Windows provide the Windows Subsystem for Linux (WSL).

With WSL, you can have most of what you like about Linux inside your Windows session. You just have to know how to set it up, and I’m going to show you one way that works for me with reasonably stable versions of Windows 10. Continue reading “Linux Fu: The Windows X11 Connection”

This Is A 3D Ink Jet Printer

We spend a lot of time thinking of how to create 3D objects, but what about being able to print full color graphics on the objects we create? This isn’t just multicolor, this is full-color! Here’s one elegant solution that uses ink jets to print full color images on 3D terrain models.

Admittedly we are very late to the party on this one as the technology was spotted on season 22, episode 7 of How It’s Made that aired way back in 2013. The segment shows terrain models — think of the physical contour map under glass that you might see at a National Park or at the main lodge of a ski resort. It’s easy enough to envision how the elevation is carved out of foam by a CNC. But the application of color printing to those surfaces is what caught our eye this time around. It’s a custom rig that a company called Solid Terrain Modeling built for this purpose. Since the height at any point on the work material is already known from the milling process, four ink heads (black, cyan, magenta, yellow) have been added to individual Z-axis actuators, applying a raster image as they traverse the surface.

Part of what makes this work is the post-processing steps that follow milling. The model is very carefully cleared of debris before being sprayed with primer. Another coat of an undetermined material (“a specialty coating to receive the ink”) gets the piece ready for the ink. The final step after printing is a protective clear coat. In the How It’s Made episode, buildings and other structures are then 3D-printed and added.

It seems like the trick is to get the heads to have as small of a footprint as possible for clearance when printing in sloped areas. We’re not experts in all the available consumer ink-jet printers out there, but finding a setup where the heads are separated from the reservoirs would be key. Watching this segment made us so excited to think of the person/people who got to hack this rig together as part of their job.

Looking for other ways to abuse ink jet parts? [Sprite_TM] came up with a way to make them handheld so you print on anything from latte foam to your buddy’s forearm. There’s no better name for that than the Magic Paintbrush.

Continue reading “This Is A 3D Ink Jet Printer”

Knowing The Bits And Bytes That Make Images Live In Memory

We know we’re living in the future because there’s hi-resolution, full color images plastered on every high-density screen in sight. Of course this comes at a cost, one that’s been hidden away by the myriad improvements in the way we digitally represent those pretty pixels and how we push them to the screens. Nobody thinks about this, except those who are working behind the screen to store and light up those pixels. And hey, chances are that’ll be you some day. Time to learn a bit more about image encoding!

Test renders illustrate the time savings from premultiplied alpha formats

[Scott W Harden] put together a succinct primer on representing images in memory. It focuses on the basics of how images are stored: generally with the B before the G, sometimes including an alpha (transparent) channel, and with a number of different bit depths. Having these at the front of your mind is crucial for microcontroller projects, where deciding what types of images to support is often limited by the amount of memory available for frame buffers, and the capabilities of the screen chosen as the device’s display.

Speaking of display specifics, [Scott] shares some detail about mapping the memory to the dimensions of your screen. If the byte count of pixel data doesn’t line up nicely with the dimensions of the screen, padding the rows out may help in the processing overhead it takes to get those pixels onto the screen. He also has some tips about “premultiplied alpha” which makes the transparency calculation a part of the image itself, rather than demanding this be done when trying to update the screen. Running a test in C# on one million frame renders shows the type of savings you can expect.

Decades of trial and error landed us with these schemes. Looking back is literally an archaeology project, as one hacker discovered when trying to get a set of digital images off of a floppy from a 1990s photo processing service.