Quantcast
Channel: Grant Trebbin
Browsing latest articles
Browse All 99 View Live

Finding All Cron Events Between Two Times With Python and Croniter

I've been playing around with the idea of a discrete event simulator for a while but I needed a clear way to specify when events will occur,  particularly recurring ones.  In situations like this I try...

View Article


Image may be NSFW.
Clik here to view.

Cron Based Discrete Event Simulator

In my last post I showed how to use the croniter package to find all the cron events that occur between two dates.  I wanted to see if it was suitable for integration into my discrete event simulator,...

View Article


Image may be NSFW.
Clik here to view.

LED Bunker Light Teardown

I recently picked up this LED bunker light for $33 and I thought it'd make an interesting tear down.AT5700 bunker lightWhen you remove the diffuser from the front the first thing you see is the PCB...

View Article

Image may be NSFW.
Clik here to view.

Designing Homemade Cardboard Boxes in 3D CAD

I'm currently selling my old phone on eBay and I needed a sturdy box for shipping.  I could buy one, but why waste money on a box when I can get my hands on cardboard for free.  It was also important...

View Article

Image may be NSFW.
Clik here to view.

Arrange Rectangles with Python to Design a Carton

Recently I've been interested in cardboard boxes and how to design and model them.  In my last blog post I described how to create a box in Fusion 360.  It works but it's a cumbersome, frustrating, and...

View Article


Image may be NSFW.
Clik here to view.

Voronoi Stippling

I'm trying to write my own software to convert normal raster images to a corresponding stippled version.  If you're unfamiliar with the term, stippling is a style of artwork that that uses are large...

View Article

Image may be NSFW.
Clik here to view.

Entry and Exit Points for Space Filling Paths on a Grid

I've been researching space filling curves recently and came across an interesting algorithm to generate curves for arbitrary areas. To be completely accurate, space filling curves cover the entire...

View Article

Image may be NSFW.
Clik here to view.

Hilbert Curve Generation With Lookup Tables

I've been researching something that requires a Hilbert curve and I thought I'd share how to generate the path and also move between the index and coordinates of points.For those of you unfamiliar with...

View Article


Image may be NSFW.
Clik here to view.

Converting Binary to Gray Code with XOR

Over the last week I've been researching Gray Codes and how to generate them. I understand the basic concept but I wanted a deeper understanding.  Most of the explanations out there are a little dense...

View Article


Image may be NSFW.
Clik here to view.

Calculating Hilbert Curve Coordinates

You may have noticed from some of my previous blog posts that I've fallen down a rabbit hole learning about Gray codes and Hilbert curves.  They weren't just random topics.  I wrote those articles in...

View Article

Image may be NSFW.
Clik here to view.

Pseudo Hilbert Curve for Arbitrary Rectangular Regions - Part 1

It's been a bit longer than usual so I thought that an update was in order.  I've been working on implementing an algorithm that generates Hilbert curves for arbitrary rectangular regions and I've been...

View Article

Image may be NSFW.
Clik here to view.

Pseudo Hilbert Curve for Arbitrary Rectangular Regions - Part 2

I fixed the problems mentioned in my last blog post about Pseudo Hilbert curves.  When both side of a block are of length divisible by 4 the block is divided into 2x2 sub-blocks.  Each of these blocks...

View Article

Image may be NSFW.
Clik here to view.

Efficient Centroid Calculation for Discrete Areas

A project I'm working on requires the repeated calculation of weighted centroids for arbitrary regions in an image.  Calculation of centroids is fairly straight forward but computationally expensive....

View Article


Image may be NSFW.
Clik here to view.

Generating Seed Points For Voronoi Stippling

I've been working on a way to generate an initial distribution of seed points for a Voronoi stippling program that I played with a while ago.  The problem is that for the final image to look good you...

View Article

Image may be NSFW.
Clik here to view.

Testing All The PINs On A Lock Box With A Forgotten Code

A long time ago I did a blog post on PIN coded lock boxes that you put on your house to hold a spare set of keys. Their main function is to give easy access for emergency services in case they need...

View Article


Linux Text To Speech with Saved Audio

In my last blog post I described a procedure to find a forgotton PIN for 10 digit mechanical lock boxes where you enter a specific sequence of button presses to efficiently test all the combinations....

View Article

Image may be NSFW.
Clik here to view.

Generating Stippled Images with Stiptacular

A few weeks ago I posted about how to generate stippled images from regular input images. The code was garbage at the time so I've improved it and posted it for people to use or learn from.  I only...

View Article


Image may be NSFW.
Clik here to view.

Merge A Data Set With A Template File To Generate Output Files

For something I'm working on I need to be able to create a large number of files by filling in fields in a template file with entries from a data set. You'd think that would be easy with Linux but I...

View Article

Image may be NSFW.
Clik here to view.

Riveting Plywood to Metal

Today I'll give you a quick rundown of my experiment riveting aluminium to plywood.2.8 mm Plywood Riveted to 1.4 mm AluminiumIf you've read my blog before you may know I like boxes and storage...

View Article

Image may be NSFW.
Clik here to view.

Suburban Fulfilment Centre

A few weeks ago I was thinking about online grocery fulfilment and different ways of getting stock to customers faster. I had some ideas about the form factor of the facilities involved and thought I'd...

View Article

Image may be NSFW.
Clik here to view.

ABC Logo Lissajous Curve

Over the last couple of days I've seen a few people mention how similar the ABC Australian logo is to the new Disney Movies Anywhere service. I don't know much about the legal side of things, but I...

View Article


Image may be NSFW.
Clik here to view.

Reducing Evaporation Rates With Rippled Surfaces

A theory that I want to test out is that adding a ripple to a surface makes it easier to clean in certain situations.  I work in retail, and sometimes the cleaning of non food safety related issues are...

View Article


Image may be NSFW.
Clik here to view.

Self Normalising Price Markdowns For Short Life Products

When selling products that have a relatively short shelf life, it becomes necessary to reduce the price on items as they approach their use by date so they sell and aren't thrown out.  This is done for...

View Article

Image may be NSFW.
Clik here to view.

Generate an STL 3D model with a surface described by an equation

I recently needed to generate a 3D model for printing based on an equation and couldn't find software to do the job.  In the end the easiest thing to do was to write a quick Python script called...

View Article

Image may be NSFW.
Clik here to view.

How Can Polls Be Wrong and Right At The Same Time?

The results of the 2016 Presidential election have surprised many and caused people to call into question how accurate polls are.  There are endless think pieces about how the polls were wrong and how...

View Article

Browsing latest articles
Browse All 99 View Live