hacker news
$0 of $4,000 Goal
0% Complete
Raised by 0 Donors
Campaign Started:
November 08, 2017
Thank You...

Donor Comments

Be The First To Comment

Quake on an oscilloscope: A technical report

hacker news
A summary of some problems I faced when tinkering with Quake to get it play nicely on an oscilloscope.

After seeing some cool clips like this mushroom thing and of course Youscope, playing Quake on a scope seemed like a great idea. It ticks all the marks that make me happy: low-poly, realtime rendered and open source.

Testing, testing

First I wrote a simple XY-oscilloscope simulator in Processing. Youscope rendered cleanly in it after I added some phosphorus decay simulation so that longer lines are rendered dimmer. So far so good.

Rendering lines

The XY-mode of an oscilloscope is pretty straightforward. Two voltages specify the horizontal and vertical position of the ray, so by varying these as a function of time you can draw shapes. Basically you output a set of 2D points with coordinates in range [-1, 1], view it in XY-mode on the oscilloscope and Bob’s your uncle.

Drawing a line segment is linearly interpolating between two points during some time interval. It’s important to keep the drawing speed constant between lines of different lengths because otherwise you’ll end up having lines with varying intensities. According to a great page by Jed Margolin, you don’t actually need to calculate the length of the line to keep the intensities at bay since an approximation will be enough because of the non-linear gamma curve of the monitor. I went with the correct solution though.

In order to line draw line segments that are not connected together, you need to move the ray quickly across the screen without actually tracing a visible line. This can be done by spending more time drawing the visible lines and then scaling the monitor intensity accordingly to hide unwanted artefacts.

I whipped up a toy where you could draw a single line with a mouse and it would get played back as audio from the speakers. Then I hooked up system audio output to line-in and verified it looked OK in the scope simulator.
Use Facebook to Leave a Comment Below: Comment (We're only using your Facebook Name and Photo for the comments. Nothing gets posted to your wall.)
(Not ? Sign Out)

Recent Comments:

Donor Comments

Be The First To Comment

Embed Into Your Site

Ask The Author A Question

Report Campaign

Campaign Link

Copy, Paste & Share this campaign.

Campaign Link

Copy & Paste link to Share your campaign.
Or, embed your campaign on your website.

Share Campaign

Thanks For The Hug! Featured Image
This is a ONE time post to your Facebook Wall.