Adding Perlin Noise To 3D Printed Parts, With Python

Want to add a bit of visual flair to 3D printed parts that goes maybe a little more than skin-deep? That’s exactly what [volzo] was after, which led him to create a Python script capable of generating a chunk of Perlin noise, rendered as an STL file. What does that look like? An unpredictably-random landscape of hills and valleys.

The script can give printed parts a more appealing finish.

The idea is to modify a 3D model with the results of the script, leaving one with something a bit more interesting than a boring, flat surface. [volzo] explains how to use OpenSCAD to do exactly that, but it’s also possible to import the STL file the script creates into the CAD program of one’s choice and make the modifications there with some boolean operations.

If the effect looks a bit bit familiar, it’s likely because he used the method to design part of the 3D printed “toy” camera that we featured recently.

[volzo]’s method isn’t entirely plug and play, but it could still be a handy thing to keep in your back pocket when designing your next part. There are also other ways to modify the surfaces of prints for better aesthetics; we’ve previously covered velocity painting (also known as ‘tattooing’ in some slicers) and also fuzzy skin.

Perlin noise was created by [Ken Perlin] in the early 80s while working on the original Tron movie as a way to help generate more realistic-looking textures. It still fulfills that artistic function in a variety of ways, even today.

Color Us Impressed: Redbean Runs A Web Server On Six Operating Systems

The holy grail of computing is to have some way to distribute a program to any computer. This is one of those totally unachievable goals, but many have tried with varying degrees of success.  People naturally think of Java, but even before that there was UCSD’s P-code and many other attempts to pull off the same trick. We were impressed, though, with Redbean 2.0 which uses a single executable file to run a webserver — or possibly other things — on six different operating systems. If the six operating systems were all flavors of Linux or Windows that wouldn’t be very interesting. But thanks to APE — the Actually Portable Executable — format, you can run under Windows, Linux, MacOS, OpenBSD, NetBSD, and FreeBSD.

This is quite a feat when you realize that most of these take wildly different file formats. There is one small problem: you can’t use much of anything on the host operating system. However, if you look at Redbean, you’ll see there is quite a lot you can do.

Continue reading “Color Us Impressed: Redbean Runs A Web Server On Six Operating Systems”

Showing an Ortur lasercutter control module in front of a screen. There's a serial terminal open on the screen, showing the "Ortur Laser Master 3" banner, and then a Grbl prompt.

Watch Out For Lasercutter Manufacturers Violating GPL

For companies that build equipment like CNC machines or lasercutters, it’s tempting to use open-source software in a lot of areas. After all, it’s stable, featureful, and has typically passed the test of time. But using open-source software is not always without attendant responsibilities. The GPL license requires that all third-party changes shipped to users are themselves open-sourced, with possibility for legal repercussions. But for that, someone has to step up and hold them accountable.

Here, the manufacturer under fire is Ortur. They ship laser engravers that quite obviously use the Grbl firmware, or a modified version thereof, so [Norbert] asked them for the source code. They replied that it was a “business secret”. He even wrote them a second time, and they refused. Step three, then, is making a video about it.

Unfortunately [Norbert] doesn’t have the resources to start international legal enforcement, so instead he suggests we should start talking openly about the manufacturers involved. This makes sense, since such publicity makes it way easier for a lawsuit eventually happen, and we’ve seen real consequences come to Samsung, Creality and Skype, among others.

Many of us have fought with laser cutters burdened by proprietary firmware, and while throwing the original board out is tempting, you do need to invest quite a bit more energy and money working around something that shouldn’t have been a problem. Instead, the manufacturers could do the right, and legal, thing in the first place. We should let them know that we require that of them.

Continue reading “Watch Out For Lasercutter Manufacturers Violating GPL”

Even DOOM Can Now Run DOOM!

For years now, the standard test of any newly hacked piece of hardware has been this: can it run DOOM? id Software’s 1993 classic first-person shooter has appeared on everything, but here’s one from [kgsws] that’s a bit special. It’s DOOM, running inside DOOM itself.

So how has this feat been achieved? There’s a code execution exploit inside the original DOS DOOM II executable, and that has been used to run the more modern Chocolate Doom within the original. It appears as an in-game texture, giving an odd effect as if it’s being watched in a cinema.

The video below the break shows the game-in-game in action, but the real value lies in its in-depth description of the exploit, that takes us through some of the inner workings of the game and ably explains what’s going on. It finishes up with a specially made cinema WAD in which to play DOOM-in-DOOM, and even Hexen-in-DOOM. Pick up your trusty chainsaw, it’s going to be a long night.

Continue reading “Even DOOM Can Now Run DOOM!”

Automate Internet Life With Python

Most of us are adept enough with computers that you know what they can easily do and what they can’t. Invent a new flavor of ice cream? Not easy. Grab the news headlines related to Arduinos from your favorite news feed? Relatively easy. But, of course, the devil is in the details. FreeCodeCamp has a 3-hour course from [Frank Andrade] that dives into the gory details of automating web tasks using Python and a variety of libraries like Path, Xpath, and Selenium. You can watch the course, below.

Topics start off with grabbing tables from websites and PDFs. But it quickly graduates to general-purpose web scraping and even web automation. These techniques can be very useful for testing browser-based applications, too.

By the end, you’ve created an executable that grabs news every day and automatically generates an Excel report. There’s also a little wind down about WhatApp automation. A little something for everyone. We also greatly approved of [Frank]’s workspace which appears in the background. Looks like he would enjoy reading Hackaday.

Honestly, while we’ve seen easier methods of automating the browser, there’s something appealing about having the control something like Python affords. Sure beats building hardware to simulate a human-in-the-loop.

Continue reading “Automate Internet Life With Python”

Injecting A Bit Of Rust Via DLL

Ever been frustrated that a software package was missing a feature you want? In the best-case scenario, the software would be open source and you could just tweak the code and rebuild. But in many cases, the software is closed-source. In the case of [Faster than lime], he found a SNES emulator (Snes9X) that didn’t support controllers to showcase the technique. So with a little bit of Rust, he wrote some code that could be injected into the emulator via DLL injection.

It’s a fantastic tutorial that shows the technique. He starts by creating a Rust project that uses the DLL-Syringe crate (the rust version of dependency management). This crate does much of the heavy lifting involved with injecting a DLL into a target process. The rest of the journey is an excellent process of going through the Windows documentation and implementing the features. The DLL just reads the controller and then sends the right input to the program. In the end, [Faster than lime] has a great injected DLL and we have a wonderful time learning about Rust and debugging in an injection environment!

It’s been a while since we last covered DLL injection, and it’s nice to see how the process has evolved. Video after the break.

Continue reading “Injecting A Bit Of Rust Via DLL”

Grok Rust In A Flash

Here at Hackaday, we are big proponents of using the best tool for the job (or making your own tool if required). But when all you know how to use is Java, everything looks object-oriented. Bad jokes aside, it is important to have many tools at your disposal to allow you to choose wisely. Why not spend a few minutes with [No Boilerplate] and understand the basics of Rust?

The focus of the video is to go through as much Rust as possible and teach you how to read it. The idea is that rather than work your way from basic concepts, [No Boilerplate] will go over the vast majority of what you’ll see in a Rust-based program. Whether you’re coming from an object-oriented, functional, or just plain C-based background; you’ll feel comfortable since he makes an effort to compare to what you already know. Some of Rust’s more unique features are covered such as mutability, scope, matching, and strings. However, lifetimes, closures, and traits were left out to keep the video short. These topics are covered in an excellent blog post by [Faster than lime] which this video was based on.

What isn’t discussed is running Rust in a no-std environment like a PIC32. Rust has seen exciting development over the past few years with the Linux kernel getting rusty and the compiler getting continually better. Video after the break.

Continue reading “Grok Rust In A Flash”