Towards the end of the project, I needed a few more of the pixelly images at short notice, to illustrate the essays and about pages on the site. Rather than bother Geraldine, I reached for Processing to see if I could match the look of the homepage imagery that she had created.
I came up with an applet that used a bit of blurring, a bit of distance fall-off, and a bit of perlin noise to create the effect that we were looking for (decorative, obscured, but related to the overall site). Here's an example of the imagery created from a picture of Scott Snibbe's Three Drops that we used on the page for Jennifer Frazier's essay:
You can see the full applet and source code here, and I think it's a good example of how a generative solution to design elements can keep a project flexible right up until launch (and beyond).
A variation on the tube map time travel applet, this version maintains the geographical layout but adds contours to show how long it takes to travel between stations. The contouring method isn't quite right (I should have used 1D textures), but it's good enough to experiment with.
I've finally had time to get my Travel Time Tube Map applet to a presentable stage.
There's a list of desired improvements on the applet page, but the next step for me is plotting this information on the Harry Beck style diagram rather than a geographic map. If anyone knows of a vector format tube map I could use to get me started, please let me know.
Back to our regular scheduled programming.
I've just been experimenting with a couple of implementations of 3D picking for simple scenes composed of triangles.
Picking with buffer is really simple, and can be pixel-accurate (but isn't in this case because I reduced the picking resolution for speed reasons). It requires you to draw your scene twice... once as you normally would, and once to an offscreen buffer using the triangle index as the fill colour. You then look at the colour of the object under mouseX/Y in the buffer to get the index of the picked object. It's a bit slow, but it works accurately even in this random-triangle scene.
Picking with projection projects all the triangles to screen space, depth sorts them, and checks if any of the projected triangles contains the mouse point. It's not 100% accurate, but for scenes without intersecting triangles it will be fine, and it's faster than the buffer-based method.
There are much faster methods if you're dealing with more geometry, but either of these methods should be fine for simple scenes. On the Processing board, cello points out this great tutorial for doing the same things in OpenGL. Marquee selection would be a simple extension of the pixel buffer method, and a ray-based tutorial is in the works (stay tuned).
It's worth noting that the back-buffer method documented there works for P3D (so no need to create another graphics object) but that in OpenGL the get(mouseX,mouseY) method doesn't work in the same way yet, so it requires different code (example here).
Apologies for delay with raycasting example. If anyone else wants to do it, please feel free and I'll link to it from here. Otherwise, don't hold your breath!
I'm testing out different interfaces for drawing and annotating maps. More to come, once I fix my line intersection function, which thinks my streets are infinitely long - oops!
Still a work in progress.
Work in progress.
(a 3D revamp of earlier 2D particle/attractor code)