6231 stories
·
116 followers

Truchet images

1 Share

I got interested in Truchet tiles, and did some hacking around to understand them better, and then display some images using them. The code is not clean or documented, and it’s inefficient in dumb ways, but it made some nice pictures. The code is at nedbat/truchet if you want to experiment.

A simple example of Truchet is Smith tiles. The tiles are designed to fit together seamlessly even when placed randomly:

Random orientations of black/white tiles

Christopher Carlson came up with a way to generalize the tiles so they could be placed on top of each other at different sizes. A square can be covered by four half-sized tiles with inverted colors and extra wings, and the pattern will remain seamless.

Here are his tiles:

The 15 Carlson Truchet tiles

It can be hard to see how they overlap, but this is a start. This is three different sizes of tile overlaid randomly, with the grid displayed to help see the edges:

A Carlson tiling at three different sizes

I love the randomness of these images, how shapes emerge that were not in the tiles themselves. I’ve been using them as Zoom backgrounds and desktop wallpapers. But I wondered if they could be used to create images.

The set of gray values in the Carlson set is somewhat limited, so I created a new set of tiles with more opportunities for variation:

A larger set of new multi-scale Truchet tiles

These produced even more chaos and serendipity when used randomly:

Randomly placed N6 Truchet tiles

To make images, I used a photo as source and fit tiles onto it to match the gray levels. Larger squares would be subdivided when their sub-squares’ intensities differed more than some threshold:

Young Marilyn Monroe, photo
Young Marilyn Monroe, with Truchet tiles
Me, photo
Me, with Truchet tiles

The algorithm to pick a tile will try to choose a good orientation, to match the colors within the square. Notice the tiles used for my shoulders. Though, on the flip side, both these images clearly exhibit “the forehead problem” because there’s little color variation there.

Looking around for other high-contrast images, I tried a well-known blogger’s avatar:

Coding Horror, in Truchet

The subdivision algorithm uses a threshold to decide when a square has enough variation within it to deserve subdivision. What happens if we start that threshold very large, and slide it down to very small, animating the result?

Marilyn, emerging from coarse-grained to fine-grained detail
Read the whole story
jepler
5 hours ago
reply
Earth, Sol system, Western spiral arm
Share this story
Delete

PrusaSlicer Now Imports STEP Files, Here’s Why That’s a Big Deal

1 Comment
Art of 3D printer in the middle of printing a Hackaday Jolly Wrencher logo

PrusaSlicer has a new feature: the ability to import a CAD model for 3D printing. Starting in version 2.5.0-beta1, PrusaSlicer can import STEP format 3D models. An imported STEP file is converted to a triangle mesh on import (making it much like a typical .stl or .3mf file) which means that slicing all happens as one would normally expect. This is pretty exciting news, because one is not normally able to drop a CAD format 3D model directly into a slicer. With this change, one can now drag .stp or .step files directly into PrusaSlicer for printing.

First, a brief recap. In the world of 3D models there are two basic kinds: meshes and CAD models. The two work very differently, especially when it comes to editing. 3D printing has a long history of using .stl files (which are meshes) but making engineering-type changes to such files is difficult. Altering the size of a thread or changing mounting holes in a CAD model is easy. On an STL, it is not. This leads to awkward workarounds when engineering-type changes are needed on STLs. STEP, on the other hand, is a format widely supported by CAD programs, and can now be understood by PrusaSlicer directly.

Perhaps this will help shift people more towards sharing the STEP files of any models they create, because access to the CAD file makes it so much easier for others to make modifications, and now the CAD file and the printable model don’t have to be two separate formats. While nothing was ever actually stopping folks from sharing their CAD models in STEP format, perhaps this will help normalize it more.

You may be wondering why it has taken so long for a slicer to get a feature like this. One reason is that the STEP format is difficult to implement. For one thing, entities (the elements defining the model) in STEP can be in any order, and can themselves freely reference other entities regardless of “where” any of them may appear in the file. This makes it impossible to read and parse a STEP file sequentially. STL format is, by comparison, almost trivial to implement. This has in part contributed to the inertia keeping STL as the format making the 3D printing world go round.

Want to try it out? Beta releases of PrusaSlicer can be safely run on a machine alongside production releases, and PrusaSlicer has support for many other printers (not just Prusa machines), so if you’re curious, give it a peek.

Read the whole story
jepler
6 hours ago
reply
neat!
Earth, Sol system, Western spiral arm
Share this story
Delete

Statement to the Financial Stability Oversight Council: Regulating digital assets

2 Shares

I was asked to give a statement to a Financial Stability Oversight Council discussion that stemmed from the Executive Order on Ensuring Responsible Development of Digital Assets. I was asked to specifically address: technological risks posed by digital assets, factors that would drive substantially greater adoption of digital assets, and actions that financial regulators could take to address financial stability risks and regulatory gaps associated with digital assets. I’ve reprinted that statement here.


I’m a software engineer and also an independent researcher of cryptocurrencies and public blockchain technologies more broadly. I mostly focus on hacks, scams, and the other devastating impacts of some of these projects on retail participants, as well as some of the risks we are facing if cryptocurrencies enjoy greater adoption and integration into both finance and society in general. I hold no cryptocurrency or positions in cryptocurrency companies, nor do I hold any long or short positions on crypto or related companies.

I would like to begin first by noting that my particular area of interest and research is cryptocurrencies, and so I will be focusing on those in my remarks today. However, the concept of “digital assets”, and even just “digital currencies”, is much broader. While I am quite critical of cryptocurrencies and skeptical of their potential to improve finance or society as a whole, I do remain cautiously optimistic about some digital asset use cases: namely, the eventual introduction of a non-cryptocurrency-based form of digital cash. I think it is important to recognize that cryptocurrencies and other blockchain-based tokens are only a subset of digital assets.


Some features of cryptocurrencies pose risks both to individual consumers and to the financial system in general.

One so-called feature of cryptocurrency is that transactions are irreversible: once a transaction has been recorded to the chain, there is no undoing it. If party A sends party B some crypto tokens, the closest thing to “undoing” that transaction is to convince party B to send the tokens back. This differs from traditional finance, where there is some consumer recourse in the case of fraudulent transactions or erroneous transfers. If a user transfers crypto to the wrong address, falls for a scam, or suffers a hack, that transaction is permanent.

Privacy and pseudonymity on a public ledger also poses some risks that don’t exist in much of traditional finance. With cryptocurrencies, it is as if everyone’s banking transactions were publicly visible, but each account name was replaced with a random string of characters. In some cases, even the exchange doesn’t know who controls the account associated with the string of characters. Some cryptocurrency exchanges and other projects implement varying degrees of know-your-customer and anti-money laundering protection, requiring their users to submit documentation, though even those that do often implement these restrictions in shoddy ways. Some don’t require this at all—particularly the decentralized exchanges and projects—and allow people to transact with no identity verification. This introduces additional difficulties for law enforcement when trying to address fraud and other crimes, and also carries risk around sanctioned individuals and groups.

For those who are technologically savvy, the pseudonymity can be a boon: they are able to operate without disclosing their identity to the public or to the services they choose to use, and they can maintain a degree of privacy. For criminals, it’s even more of a benefit—it’s much easier to get away with a crime when the profits of that crime can be transferred to an anonymous crypto wallet rather than a traditional bank account. Furthermore, there are a proliferation of tools—particularly cryptocurrency tumblers—which help users who know to use them to not only maintain their anonymity, but to launder stolen funds.

However, for average users, it can be challenging to maintain anonymity with crypto wallets, and users often inadvertantly “dox” themselves—making their entire transaction histories public. The consequences of this tend to be fairly minimal today (assuming the person is not engaging in criminal behavior). However, if cryptocurrency becomes more widely adopted and used more for goods and services in the real world, both the difficulty of properly maintaining privacy and the consequences of failing to do so will increase.

Finally, cryptocurrency projects are highly susceptible to a broad range of attacks. There are many reasons for this, including that financial systems running on a public blockchain, often with open-source code, lower the barrier to entry for attackers compared to more traditional financial systems. Crypto projects are also often “testing in production”: proving out not only untested code, but untested financial models, with real people’s money. The collapse of the Terra ecosystem in May is perhaps a good example of this—the financial model behind that “algorithmic stablecoin” turned out to not work in practice, and the project failed in a spectacular and tragic way. Software development standards tend to be low, particularly when compared to industries developing critical systems, and there tends to be little in the way of testing, auditing, or verification of code. There are also enormous incentives for attacks, and software developers are finding themselves trying to safeguard against state-sponsored threat actors.

The impact of both attacks and unintentional failures of cryptocurrency projects can be particularly enormous due to the highly-intertwined nature of many of these projects. As we’ve seen recently with projects and companies including Terra, Celsius, and Voyager, many crypto projects are deeply reliant on one another—both in software but also in terms of borrowing and lending—and the failure of a single token or ecosystem can have many times the impact one would expect due to exposure across the industry. As of yet we have not seen terribly much in the way of contagion to traditional finance, but as crypto continues to enter the mainstream, without proper regulation it will only be a matter of time.


Although adoption of crypto assets has increased in recent years, they still remain fairly niche. Some factors that are likely to speed adoption include: the emergence of more mature consumer apps that address the poor user experience of buying, trading, and selling cryptocurrencies; further adoption of cryptocurrencies into traditional finance (for example, via crypto ETFs, or the burgeoning trend of retirement funds embracing crypto); the adoption of cryptocurrency into more facets of society (for example, acceptance as payment at stores, as collateral for traditional loans); and government recognition and acceptance of cryptocurrencies.


When it comes to regulation, there must be a careful balance between protecting consumers while not exposing the financial system to systemic risk. Perhaps most importantly, the idea that we must take a light touch to regulation in order to not stifle innovation is overblown. The most impressive innovation we have seen with cryptocurrencies have been in separating average people from their money via new forms of financial fraud, or old forms of it that have been updated with a crypto token. Ransomware has flourished as a result of cryptocurrency, as have cybercriminals with various other specialties who have prospered thanks to this new industry of far too much money and bad code. Innovation in fraud and theft is still innovation, undeniably, but we must realize that not all innovation is societally good, nor does this kind of innovation call for light touch regulation, regulatory sandboxes, and the other kinds of favorable conditions that crypto firms and lobbying groups have been clamoring for.

When it comes to systemic risk, in my opinion we should be cautious in increasing the exposure of traditional finance to the regular failures of crypto projects. Stablecoins, for example, pose enormous risk to cryptocurrency as a whole, and some recent proposals to treat stablecoin issuers as banks concern me. The government should be extremely cautious in how it might put its backing behind tokens that are used almost exclusively to enable people to leverage up their crypto holdings in decentralized finance (defi) projects. I would point you to the excellent work of Professor Hilary Allen to provide much more detail on this point—in particular her statement on stablecoins to the U.S. Senate Committee on Banking, Housing, and Urban Affairs in December of 2021.

The same is true for aspects of cryptocurrencies beyond stablecoins. Fiduciaries should not be recommending crypto to their clients any more than they should be suggesting they diversify into scratch-off tickets, and I am horrified that retirement fund operators in particular are beginning to embrace the idea.

Clarity should be provided around the fact that cryptocurrencies are, broadly, securities, and they should be strictly regulated as such.

Much of the regulation should take place at crypto on- and off-ramps, such as the many crypto exchanges currently operating in the US. These are, in my opinion, the best place to impose limits on a somewhat challenging-to-regulate industry. No time should be wasted arguing over whether to try to “ban cryptocurrencies” as a whole, or regulate the software that people can write or execute—a ridiculous idea—instead, focus should be placed on where that software begins to do real harm to both individuals and the financial system, and that is where dollars are converted to crypto tokens and vice versa.

Thank you for your time and for inviting me to speak.

Read the whole story
jepler
14 hours ago
reply
Earth, Sol system, Western spiral arm
brennen
16 hours ago
reply
Boulder, CO
Share this story
Delete

Apple Finds Its Next Big Business: Showing Ads on Your iPhone

2 Comments
"Apple is set to expand ads to new areas of your iPhone and iPad in search of its next big revenue driver," reports Bloomberg.

The Verge writes that Apple "could eventually bring ads to more of the apps that come pre-installed on your iPhone and other Apple devices, including Maps, Books, and Podcasts." According to a report from Bloomberg's Mark Gurman, Apple has internally tested search ads in Maps, which could display recommendations when you search for restaurants, stores, or other nearby businesses. Apple already implements a similar advertising model on the App Store, as developers can pay to have their app promoted on a search page for a particular query, like "puzzle games" or "photo editor." As noted by Gurman, ads on Maps could work in the same way, with businesses paying to appear at the top of search results when users enter certain search terms.

Gurman believes that Apple could introduce ads to its native Podcasts and Books apps as well. [Gurman describes this as "likely".] This could potentially allow publishers to place ads in areas within each app, or pay to get their content placed higher in search results. Just like Maps, Podcasts and Books are currently ad-free.... Gurman mentions the potential for advertising on Apple TV Plus, too, and says the company could opt to create a lower-priced ad-supported tier, something both Netflix and Disney Plus plan on doing by the end of this year.

Bloomberg points out that Apple is already displaying ads inside its News app — where some of the money actually goes back to news publishers. ("Apple also lets publishers advertise within their stories and keep the vast majority of that money.")

And while you can disable ad personalization — which 78% of iOS users have done — Bloomberg notes that "Another ironic detail here is that the company's advertising system uses data from its other services and your Apple account to decide which ads to serve. That doesn't feel like a privacy-first policy."

Bloomberg's conclusion? "Now the only question is whether the customers of Apple — a champion of privacy and clean interfaces — are ready to live with a lot more ads."
Read the whole story
jepler
3 days ago
reply
why not destroy one of the few positive differences between you & the competition...?
Earth, Sol system, Western spiral arm
ReadLots
3 days ago
Because the competition is going to do it too.
Share this story
Delete
1 public comment
sarcozona
2 days ago
reply
Well fuck that
Epiphyte City

Making a Haunted Halloween Tree for Under $50

1 Comment

More big bang for the bucks Halloween haunts projects. Here’s how to make a haunted Halloween tree for under $50.

Read the whole story
jepler
7 days ago
reply
yes, that's right, Adafruit are already thinking ahead to halloween
Earth, Sol system, Western spiral arm
Share this story
Delete

Complex Vowels

2 Comments and 4 Shares
Pronouncing [ṡṡċċḣḣẇẇȧȧ] is easy; you just say it like the 'x' in 'fire'.
Read the whole story
jepler
7 days ago
reply
Also it disturbs the dogs
Earth, Sol system, Western spiral arm
Share this story
Delete
1 public comment
jlvanderzwan
7 days ago
reply
In order to make these sounds you have to turn your nose inside-out in the fourth dimension, ending up looking like a Klein bottle
Next Page of Stories