William Matthews

A Quick Crash Course on Ray Marching

Wait, this isn’t a post on Ray Tracing? Well not quite, I don’t mean “ray tracing” in the sense of scene rendering in computer graphics. My research is based on some very specific optical devices and I am interested in how geometry impacts their performance. Ray tracing is typically complicated, but ‘Ray Marching’ is a simplified way to achieve a very similar result. What I’m interested in “ray tracing” is the optical path a single ray will take inside the device - so by running Monte-Carlo simulations I can estimate the statistical nature of the device (exit angle, exit location, optical path length and more). Read more...

Graph Modulation - my final year project

Graph Modulation? This project was made to probe various modulation schemes, with the hope of exploring more complicated schemes which scale quickly with respect to the amount of resources present. A resource in this context is a communications channel, and $\mathcal{O}(n \log (n))$ growth rate is known to exist through Permutation Modulation. This is a faster growth rate than linear - so I attempted to see if a scheme growing as $\mathcal{O}(n^{(1 + \epsilon)})$ is possible through using a graph (the combinatoric structure, that is). Read more...

Amateur Maths 1: Some Fiddling With Complex Numbers

The More You Know, the More You Don’t Know I was fiddling around with complex numbers and suddenly, something horrible happened. Everything I thought I knew crumbled before me and I had a palpable taste of defeat in my mouth. Curse you, complex numbers. I was fiddling with the expression: $$ f(x) = x^{i \pi} $$ where $i=\sqrt{-1}$, just to see how the argument changed with $x$ for my intuition, but something much worse happened. Read more...

The Best Approximation of All Time

The what? There comes a time in every computer-oriented blog where this post is made, rather than delaying the inevitable, I feel it is time to commit to writing and get it over with. This post is about one of the best approximations of all time, the Fast Inverse Square Root. I’d like to go over why we need this first, since I rarely have encountered detailed backgrounds. Normal Vectors In computer graphics, normalised vectors ($L_2$ magnitude of the vector is 1, or more formally $||\hat{\mathbf{v}}||_2 = 1$) are used a lot for lighting (luminence, shadows, reflections and more). Read more...

Prime Number Images

Motivation I recently found a rather nice prime number, belonging to Trinity Hall in Cambridge. The “Trinity Hall Prime” was gifted to the college by a junior research fellow (Professor McKee) and bears a likeness of the Trinity Hall coat of arms. Since I liked how cute the number was, I decided I would give it a go for the generic case of any input image being converted into a prime number bearing its likeness. Read more...

Easily Implanting CSV data into LaTeX documents and Report Generation

Introduction This short post covers more than just importing CSVs into LaTeX, as I’d run out of things to say very quickly. I briefly cover how to use data from a SQL query to efficiently create a LaTeX report, which was used for the Oxfeud.it project I am working on with Daniel Mroz. (This is all using the assumption you are using MySQL as your SQL server.) Motivation Quite often in Engineering we are presented with large sets of data that need to included with a document (quite often in appendicies), and it can be quite a pain to include a large set of data in a writeup if in LaTeX. Read more...

Obtaining Facebook Post IDs From a Hashtag Search

DEPRECATED! Oxfeud.it is now deprecated due to facebook’s new TOS. Motivation/Introduction For the Oxfeud.it system I am making in conjunction with Dan Mroz, we needed to generate a list of all the posts on a page, to be fed to our ‘post scraper’ which adds the information to our database. Facebook has an API that allows people to search pages for post IDs, information on reactions, comments, and more - however it is very buggy. Read more...

Extracting a Sinusuoid From a Square Signal

Motivation In some electronics projects we may be required to cost-effectively generate a sinusoid. Digital systems are ubiquitous in today’s world - and powerful computational nodes such as the ESP8266 are available at extremely low prices (on the order of $1). Generating a sine wave, however is something that can’t be done with a digital chip - usually only able to bit-bang a square wave, more expensive chips may have DACs that provide sine capability. Read more...

Reconstruction of Images with High Monochromatic Noises

Motivation In high radiation environments, CMOS sensors can be locally saturated when struck with high-energy particles. This appears to an observer as a white pixel. When radiation levels become very high, saturated pixels become the dominant feature of the image. To an observer, this may make the image hard to read, and I believed a method to reject monochromatic noises would have utility. Assumptions and Definitions In this method demonstration I will only consider the case of monochromatic noise applied to an image, with no leakage to other intensities. Read more...


1 of 1