When it comes to mathematics, the average person can probably get through most of life well enough with just basic algebra. Some simple statistical concepts would be helpful, and a little calculus couldn’t hurt. But that leaves out a lot of interesting mathematical concepts that really do have applications in everyday life and are just plain fascinating in their own right.
Chief among these concepts is the Fourier transform, which is the key to understanding everything from how JPEGs work to how we can stream audio and video over the Internet. To help get your mind around the concept, [Jez Swanson] has this interactive Fourier transform visualizer that really drives home the important points. This is high-level stuff; it just covers the basic concepts of a Fourier transform, how they work, and what they’re good for in everyday life. There are no equations, just engaging animations that show how any function can be decomposed into a set of sine waves. One shows the approximation of a square wave with a slider to control to vary the number of component sine waves; a button lets you hear the resulting sound getting harsher as it approaches a true square wave. There’s also a great bit on epicycles and SVGs, and one of the best introductions to encoding images as JPEGs that we’ve seen. The best part: all the code behind the demos is available on GitHub.
Bringing modern protocols and techniques to vintage computers is a favorite pastime for hackers, and over the years we’ve seen some absolutely incredible hardware and software projects designed specifically to do what most people would consider impossible. They’re very rarely practical projects, of course. But that’s never really the point.
Today we present another excellent entry into this niche avenue of hacking: Renderific, a tool to render SVGs on 8-bit Atari computers by [Kevin Savetz]. The MIT licensed program is written in Turbo-BASIC XL and allows computers such the 1200XL and 800XL to not only render the image on screen but output it to an attached plotter. There are a few niggling issues with some files, and apparently the plotter draws the image upside-down for some reason, but on the whole we can now add “SVG Rendering” to the list of things you can do with a nearly 40-year-old computer.
Of course, those who are familiar with these 1980’s machines might wonder how their limited CPUs can possibly cope with such a task. Well, that’s where the impracticality comes in. According to [Kevin], you can be in for quite a wait depending on the complexity of the image. In his tests, some SVGs took up to 45 minutes to fully render on the screen, so you might want to have a snack handy.
If you’re interested in lending a hand with the project, it sounds as though [Kevin] could use some assistance in figuring out why the Atari 1020 plotter doesn’t like the output of his program. There’s also a few SVG functions and forms of Bézier curves that need some work if you’ve got your Turbo-BASIC XL programming books handy.
Badgelife and the rise of artistic PCBs are pushing the envelope of what can be done with printed circuit boards. And if you’re doing PCB art, you really want to do it with vectors. This is a surprisingly hard problem, because very few software tools can actually do DXFs and SVGs properly. Never fear, because [TallDarknWeirdo] has the solution for you. It’s in Eagle, and it uses Illustrator and Inkscape, but then again this is a hard problem.
The demonstration article for this example is just a Christmas tree. It’s somewhat topical green soldermask is standard, FR4 looks like wood, and silver and gold and all that. [TallDarknWeirdo] first split up this vector art into its component pieces — soldermask, bare FR4, and copper — then imported it into Inkscape to make the SVGs. This was then thrown into an online tool that creates something Eagle can understand. The results are better than importing bitmaps, resulting in much cleaner lines in the finished board.
Quick word of warning before we get into this, though: if you’re reading this in 2019 or later, this info might be out of date. Autodesk should be releasing a vector import utility for Eagle shortly, and we’re going to be taking a deep dive into this tool and complaining until it works. Until then, this is the best way to get vector art into Eagle.
[Scott Swaaley] needed a bunch of timing pulleys for the clock he was building. He had already decided on the MXL profile, but he needed so many of these toothed pulleys in so many configurations (hex-bored, hubless) that it would blow out his budget. Plus, he wanted them transparent as well. So why not just laser them out of acrylic?
Not finding anything useful on the manufacturers’ sites, [Scott] decided to create his own web application to generate the shapes and download them as SVGs, dreaming of a resource like Gear Generator except for timing pulleys instead of involute spur gears. [Scott] has the application running on his GitHub. You can create MXL, XL, and L pulleys with any number of teeth and any hole size. From there you can output as an SVG and laser or mill the pulley.
“The great thing about standards is that there are so many to choose from.” Truer words were never spoken, and this goes double for the hobbyist world of hardware hacking. It seems that every module, every company, and every individual hacker has a favorite way of putting the same pins in a row.
We have an entire drawer full of adapters that just go from one pinout to another, or one programmer to many different target boards. We’ll be the first to admit that it’s often our own darn fault — we decided to swap the reset and ground lines because it was convenient for one design, and now we have two adapters. But imagine a world where there was only a handful of distinct pinouts — that drawer would be only half full and many projects would simply snap together. “You may say I’m a dreamer…”
This article is about connectors and standards. We’ll try not to whine and complain, although we will editorialize. We’re going to work through some of the design tradeoffs and requirements, and maybe you’ll even find that there’s already a standard pinout that’s “close enough” for your next project. And if you’ve got a frequently used pinout or use case that we’ve missed, we encourage you to share the connector pinouts in the comments, along with its pros and cons. Let’s see if we can’t make sense of this mess.
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]!
If there’s a science fair coming up, this trumps just about any 2D poster. It’s a 3D topographical map of an inactive Slovakian volcano, Poľana. [Peter Vojtek] came up an easy way to generate SVG topo patterns using Ruby.
Topographical data is available through the MapQuest API. You should be able to model just about any part of the world, but areas with the greatest elevation difference are going to yield the most interesting results. The work starts by defining a rectangular area using map coordinates and deciding the number of steps (sheets of paper representing this rectangle). The data are then chopped up into tables for each slice, converted to SVG points, and a file is spit out for the blade cutting machine. Of course you could up the game and laser cut these from more substantial stock. If you have tips for laser-cutting paper without singing the edges let us know. We’ve mostly seen failure when trying that.
The red model explained in [Peter’s] writeup uses small cross-pieces to hold the slices. We like the look of the Blue model which incorporates those crosses in the elevation representation. He doesn’t explain that specifically but it should be easy to figure out — rotate the rectangle and perform the slicing a second time, right?
If you’re looking for more fun with topography we’ve always been fond of [Caroline’s] bathymetric book.