Canvas

I've added a new section to maniacalrobot.co.uk that has been in the planning for a long time. Canvas is a playground for experimenting with procedurally generated artwork. Canvas artwork will work in the browser, and will built with HTML canvas elements are drawn with the standard 2d context javascript library.

As much as possible, I'm avoiding using any 3rd party libraries. The purpose of Canvas is to experiment, and learn the technical skills, as well as the user experience when interacting with the canvas.

There are no rules as to what will be included, it's a free space to try new experimental ideas.

 

720nm Infrared camera setup

Canon EOS M5 converted to 720nm infrared with an EF-M 22mm F/2 and EF 40mm F/2.8
Infrared Setup Canon EOS M5 converted to 720nm infrared with an EF-M 22mm F/2 and EF 40mm F/2.8

I've recently upgraded my Infrared camera from a self-converted Canon EOS M, to a professionally converted Canon EOS M5. I converted the EOS M myself to a full spectrum camera, when I upgraded my primary camera to a Canon EOS M5. Converting the camera was an effective way to keep the old camera useful, but the quality of the conversion, and the poor high ISO performance of the EOS M sensor, meant I was pushing the limits of what the camera could produce. The time had come to upgrade to a better quality system.

The Wayside, Guildford
The Wayside, Guildford The Wayside, Guildford. 720nm Infrared

Choosing which camera is a personal preference. Most cameras will convert to full spectrum or Infrared pass. As I already have an EOS M5 as my primary camera, along with a handful of EF-M lenses, as well as adapted EF and EF-S lenses, being able to share lenses between my primary camera, and my infrared camera made a lot of sense, and it helps everything fit in my Lowepro Protactic 350 camera bag. Another factor is cost. Cameras aren't cheap, especially when you add the cost of converting to full spectrum or Infrared. Canon appear reluctant to continue with the EOS M series cameras and lenses, and instead focusing on the newer EOS R system. Normally this would put me off buying into an obsolete system, but for my requirements, this actually works really well, as the second hand market has plenty of EOS M cameras and lenses at very affordably prices.

I paid £279.00 with MPB (https://www.mpb.com/en-uk/product/canon-eos-m5) for an excellent condition second hand Canon EOS M5. This is a 24mp camera, with good low light/high ISO performance, and It's light and small, making for a great travel camera. For the conversion, I paid £280 with protechrepairs.co.uk for a 720nm conversion. The service has been pretty good, and I'm so far impressed with the results.

Infrared Tree
Infrared Tree Infrared Tree, 720nm
Infrared Landscape
Infrared Landscape Infrared Landscape, 720nm

Lens choice for Infrared is a lot harder to plan for, and often requires just trying different lenses to see what works best. Many lenses suffer from hot spots, this is when infrared light falls uneven on the sensor and causes an overexposed patch in the centre of the image. There is no easy way to know if a lens will work well, often older and simpler lenses will work best, but a there are specialist lens databases published by kolarivision and LifePixel that provide good options to check based on your lens mount type. There is also the excellent work carried out by Edward Noble.

I tend to prefer wider lenses for most infrared images. This partly for composition, infrared works well for landscapes as well as urban photography, but it's also for a technical reason. Infrared light diffracts faster than visible, meaning that you likely won't be using small apertures. To ensure a decent depth of field at larger apertures, it's best to use a wider angle lens. Cameras converted to infrared will also be capturing less total light, so you'll be wanting a lens that capture as much light as possible.

Infrared Trees
Infrared Trees Infrared Trees, 720nm
Infrared Trees
Infrared Trees Infrared Trees, 720nm

For my infrared setup, I have the EF-M 22mm F2, and the EF 40mm F2.8. Both of these lenses offer great infrared performance, great image quality, respectable low light performance, and both lenses are also very small. If required, I can also my full range of lenses from my primary setup, covering 10mm to 200mm, however, not all of these lenses are well suited to infrared, and usually require additional post processing to correct any lens flaring, Infrared Hotspot and refraction at wider focal ranges.

Infrared Trees
Infrared Trees Infrared Trees, 720nm

All photos on this page are taken with this new setup, and processed via Adobe Lightroom with Rob Sheas Infrared Profile pack with custom LUTs applied. I cannot recommend Robs website and Youtube channel enough for tutorials in Infrared Photography and Infrared Processing.

 

rjq: Use Ruby to query JSON on the CLI

In my day-to-day work, I spend a lot of time working with JSON, and and one of my favourite tools for working with JSON is jq. Jq is an excellent tool for working with JSON on the command line … however, I can never remember what arcane syntax I need to use to accomplish the simplest of queries. So, as any mediocre programmer, I built my own jq in my favourite language, Ruby.

How it works

rjq is a very simple program, in fact in it's original release, it's just 3 lines:

#! /usr/bin/env ruby
require 'json'
puts eval(%{JSON.parse(STDIN.read)#{ARGV[0]}})

If you're familiar with Ruby, this should all make sense … and you've probably noticed that eval call, yes, the user input to rjq is just superglued on to the back of the instantiated Hash or Array from the JSON.

Examples

We'll use the GOV UK bank holidays API as an example data source.

Firstly, we'll just get the top level keys in the dataset:

~/ curl -s https://www.gov.uk/bank-holidays.json | rjq ".keys"
england-and-wales
scotland
northern-ireland

Next, we'll use a simple Ruby enumerable map to return a new formatted list of bank holidays in England and Wales:

~/ curl -s https://www.gov.uk/bank-holidays.json | rjq "['england-and-wales']['events'].map{|e| %(#{e['title']} #{e['date']} #{'🎉' if e['bunting']} ) }"
New Year’s Day 2016-01-01 🎉
Good Friday 2016-03-25
Easter Monday 2016-03-28 🎉
Early May bank holiday 2016-05-02 🎉
Spring bank holiday 2016-05-30 🎉
Summer bank holiday 2016-08-29 🎉
Boxing Day 2016-12-26 🎉
Christmas Day 2016-12-27 🎉
New Year’s Day 2017-01-02 🎉
Good Friday 2017-04-14
Easter Monday 2017-04-17 🎉
Early May bank holiday 2017-05-01 🎉
Spring bank holiday 2017-05-29 🎉

Should I use this?

As you can see, it's just simple Ruby, however, there is that eval command in there, which has the potential to introduce security concerns. You should always check the JSON datasource is trusted before operating on it.

GitHub: phil/rjq

https://github.com/phil/rjq

 

Doom II Map: Isle of Death

UAC scientists have discovered another portal to Hell. There's an isle of death on the other side. An infiltration team has been sent through to clear the area, but they haven't reported back … you're being sent in to discover what happened, and clear the area for further teams.

https://www.doomworld.com/forum/topic/119752-third-map-isle-of-death-doom-ii/?tab=comments#comment-2258839

Isle of Death
Isle of Death Isle of Death
Isle of Death
Isle of Death Isle of Death
Isle of Death
Isle of Death Isle of Death

 

Doom II Map: The Halls of Æthelwulf

An ancient medieval citadel has been discovered under the Welsh Mountains, with help from documents obtained from the Mars Base during the first invasion of Hells forces. A team of archiologists has been sent in to learn more about the connections between the ancient martian civilisation, and medieval Britain.

But contact with the archaeologist team has been lost … you’ve been sent in to clear the citadel.

https://www.doomworld.com/forum/topic/119397-new-doom-ii-map-the-halls-of-aethelwulf/?tab=comments#comment-2251069

GitHub: phil/the-halls-of-aethelwulf

https://github.com/phil/the-halls-of-aethelwulf

The Halls of Æthelwulf
The Halls of Æthelwulf The Halls of Æthelwulf
The Halls of Æthelwulf
The Halls of Æthelwulf The Halls of Æthelwulf
The Halls of Æthelwulf
The Halls of Æthelwulf The Halls of Æthelwulf
The Halls of Æthelwulf
The Halls of Æthelwulf The Halls of Æthelwulf

 

Favourite photos of 2020

At the beginning of 2020 I had planned to focus on my landscape photography a lot more, This was going to include dedicated days off work just for photography around where I live, some nice holidays abroad, and maybe some new kit. Well … holidays, remember them?

So, lockdown happened, and that kind of put an end to all my plans for the year. However, even during global pandemics, and the extreme restrictions required to beat the virus, there have been a few opportunities for some photography.

A Pair of Poppies

Late spring provided one such opportunity, when a field of Poppies appeared on the outskirts of Guildford. The national lockdown had been daily life for over a month by this time, and suddenly a brilliant red field of Poppies appeared to brighten the landscape. I'd missed the Bluebells earlier in the spring due to the restrictions, but by late Spring, things had lifted enough that I could head out early in the morning with all of my gear and make the most of what I could.

A Field of Poppies

One of the better aspects of 2020 was the endless days during Spring and Summer of sunshine and high temperatures. Typically these conditions are despised by landscape photographers, but as I've said in previous posts, I see bright sunny days as perfect conditions for improving my Infrared photography. Luckily, The National Trust are keep all of their outside spaces open, and available on a limited pre-booked basis.

Infrared Treescape
Infrared Treescape

With the options for good landscape photography conditions coming few and far between, this year has had an above normal amount of macro flower photography. My setup is for macro shots is very simple, I have a nifty 50mm f1.8 and a set of extension tubes. With this, combination you can get a really good magnification on subjects. These shots have coverage of around 2-3mm square, and a good enough depth of field.

Macro Flower
Flower

 

 

Using mind mapping software for project development

One of the plans for this year, a part from staying at home reminiscing of what travel used to like, was to focus on building this site and expanding the features that it provides. First, a little background. This site is 100% custom, it's not an 'off the shelf' template. everything you see here has been built, and designed by me. Over the years, I've tried a many different approaches to keeping track of things that need to be done, or ideas to implement, and bugs that need to be squashed.

Now, there are many project management tools available, that would fit this purpose, from simple task lists, to full blown tools providing reporting, gantt charts, agile stories, and kanban boards. For many projects, these tools can be very helpful, but for just me and this site, every one of them has always been overkill. I've tried to use these tools, but the complexity has just got in the way. I always kept finding myself going back to using a plain text file (well, actually an Apple Notes file for easy syncing between devices).

The problem of using text files

Text files are great for many things. They are simple, they can have their own structure. You can mix bullet points with text. They work everywhere. But, they have their downsides too, it's very hard to provide context within the document. Ideas that might be connected, can be separated into different sections, and loose context of how they relate to the wider subject.

Using mind mapping to keep track of things

I've always been intrigued by the idea of mind mapping. Connecting thoughts with links and hierarchies, and using colours to disguise intent behind each idea. But unfortunately, I've never had a good subject to play with them properly. It's very hard to just pickup and use a new piece technology without a good reason to need to use it.

When I first saw Mindmeister being demoed at a Ruby conference in Vienna, I suddenly had the thought that this could be a really good way to finally have a process to keep track of my plans for maniacalrobot.co.uk.

MindMeister Map of Maniacalrobot

How I use Mind Meister

All mind maps are built around a simple subject, for me, this is simply "Maniacalrobot", the name of the site. Top level sections of the site are simple black text in white bubbles. "Geistesblitze" (Brainstorms in English) is a special Mindmeister node that stores inputs from the Apple Watch app, for quickly jotting down ideas. Plain black text is just for any level under the top sections.

Red bubbles, are things that need to be done, action items, either new features, or bugs. They're typically short descriptions of the action, enough for me to know what the problem was at the time I created the node.

Yellow bubbles are ideas. Things that might becomes Red action bubbles, they might get deleted, but for now, it's for keeping track of ideas.

Using this simple mind mapping pattern, at a quick glance, I can see the back log of action items and where in the structure of the site they are. I can quickly sketch out new sections, and check for overlap in features, or areas that need work.

So far using this system, I've found myself to be far more productive when building new features and fixing bugs. What makes this system, different to most project management tools, is that the status of each idea of action is irrelevant. There is no task Icebox, no work in progress or done queues. When a red bubble is completed, it simply gets deleted, or turned into a structural node if that makes more sense. This works great for maniacalrobot.co.uk, because it's just me at the end of the day, I don't need to keep the history of every feature or bug. When it's done, it's done, and it can be deleted.

 

Infrared Photography

Bright sunny summers days are not typically great for landscape photographers. Harsh shadows, and bright direct light don't typically make for good photographic conditions. Sunrises and sunsets offer the best light, but here in the UK, at midsummer, that means very early starts or late finishes. However, Infrared photography is a great approach to making the most of these challenging bright conditions without sacrificing too much sleep.

Infrared Treescape

In many ways, Infrared photography is a lot like normal photography, the only difference is that you are capturing wave lengths of light that you cannot actually see. You can however, usually anticipate what the final image will look like. Typically, foliage will reflect most infrared light, and will therefore be the brightest subjects. Other materials will reflect Infrared light differently to normal visible light. Clouds are good reflect lots of light, but the blue sky can reflect very little, making it look like there is no atmosphere. Water, depending on reflections, can also look very dark.

Although modern camera sensors can capture Infrared light, most have an Infrared cut filter in from of them to improve image quality. This filter prevents nearly all infrared light from passing through to the sensor. However, a tiny amount of infrared light does get through, but it's not enough to impact your photographs. So, to take an infrared photograph, you just need add an Infrared filter to the front of your lens, such as a Hoya R72, that blocks all normal visible light, and only allows infrared light through, and when combined with the IR cut filter on the sensor, a tiny amount of IR light makes it through. In a practice, this means Infrared Photos are possible by just adding a simple filter to your camera, but the amount of light that eventually makes to the sensor is so small, that you'll need exposure times of over 30 seconds, even on bright sunny days when their is the most amount of infrared light in the atmosphere. So, technically possible, but long exposure times mean motion blur will be issue, and hand held shots are out of the question.

Infrared storm damaged tree
Infrared treescape

Hopefully, it should be pretty obvious that if we could remove the IR cut filter from in front of the sensor, then, inn combination with with the R72 Infrared filter on the front of the lens, then we can restrict all visible light, and allow all Infrared light through to the sensor. This allows us to take hand held infrared photographs on bright days, and my current setup can handle 1/60 second exposures at F2.0 and ISO 400 on a converted EOS-M camera and EF-M 22mm lens, with a Hoya R72 filter.

If you are comfortable converting your own camera, it is very possible to do yourself, but you should be okay with the risk of permanently damaging your camera in the process. If you are not comfortable doing this, there are companies online that will do this for you. Converting your camera is beyond the scope of this article, but you can search online for instructions for your camera model. Please be aware, that this will convert your camera into a full spectrum sensor, without any additional filters, it will capture photographs with both visible light and Infrared light, in practice this means your photographs will have a pink cast to them. But, this will give you the ability to use different IR filters. To only capture IR light, you'll need a filter that blocks light up to 720nm, but you can also use a full spectrum camera to capture near-infrared light, which is anything over 550nm.

Infrared lake and ruined abbey

Processing IR photographs will be the topic of another article, as there are many options and styles you can choose. I prefer to correct the white balance, then boost the highlights, and then use my own presets to flip the colours in the red and blue channels. This is the process that gives bright pink and white foliage, and deep blue skys with crisp clouds.

You can see more of my Infrared Photographs in my Portfolio, as well as on my Instagram feed.

 

Use a short domain

Choosing a name for your website, your online identity, the thing you'll need to say to people all the time is very important. Ideally, you should choose a name that is short, unique, easy to remember and easy to spell. A good domain should be unambiguous, for example, stationary.com and stationery.com sound the same when spoken, but have very different meanings when written. It also helps to avoid ambiguity with numbers and characters that look or sound similar.

So, my own choice of maniacalrobot.co.uk was the obvious choice! yeah, maybe not. It fails on pretty much every point, but at least it's unique. To handle my online identity, I've been using GSuite, allowing me to easily use this for emails too. Trying to spell this to people is virtually impossible, and trying to type it usually requires 2 attempts.

A simple solution to having long domain names is to simply register a shorter form that you can use, and that automatically redirects to your full address. For me, http://m7r4.uk will automatically redirect to the full http://maniacalrobot.co.uk, and using GSuote, you can add this as an alias to receive your emails on too. But why m7r4.uk? This compresses the complicated words from the full domain into a nice simple letter + number + letter + number. It's easy to say, and easy to spell, and nice and short. ManiacalRobot.co.uk is an M followed by 7 characters, then an R followed by 4 characters, and instead of using the full .co.uk, I simply chose .uk. It's a simple naming scheme that can easily be applied to any domain and makes spelling to people in person a lot easier.