Thursday, February 25, 2010
Sails and aerofoils
At the most basic level, modelling molecules with Newton's laws will get you the right result when simulating an aerofoil. However, an aerofoil does not simply deflect air downwards.
Actually this is hard to describe unambiguously, I can see why there are arguments.
Thoughts on the nature of light
This does still not account for interference. The fact that a photon travels through both slits of a double-slit experiment can be viewed as a photon in a coherent superposition.
It is quite likely that I am about to embarrass myself in exposing a woeful lack of understanding of optical quantum computing.
Does this then mean that we can use a double slit as an optical quantum computer? Actually, now that I think of it, probably not, because we can't develop gates that change behaviour of certain paths based on whether a photon passed through one slit or the other.
The result of a double-slit experiment (making some idealising assumptions) can be computed through the Fourier transform of a the slit arrangement. This in fact works for any series of slits.
Finally, the clinching proof that this is not possible is that Feynman showed that a classical computer cannot simulate a quantum computer in reasonable time. If it were possible, Feynman would have been wrong somehow.
So rememeber, quantum computing requires a way of interacting your qubits. Interference effects are not enough. I have seen interference being used in several experiments, however.. I don't understand how that works. Photons only interact with themselves... except in non-linear media, I guess. That must be it.
Thursday, February 18, 2010
Metropolis Light Transport is not unbiased
I believe MLT is a biased algorithm, as it doesn't sample rays randomly. Many papers discuss something called "start-up bias", which results from choosing the paths to be perturbed - those paths are rated as 'more important' by the algorithm.
One would think that as long as completely new paths to mutate are regularly chosen, then the algorithm will eventually converge to the same solution as normal path tracing with no mutating of paths. To take the extreme case, if every possible (within the computational accuracy of the machine) path is sampled an equal number of times, it doesn't matter if you did that using path mutation or not.
Another question, then, is whether or not the mutation process leads the renderer to implicitly favour some paths over others. For example, paths right on the edge of the light may have fewer valid paths near them and will thus be sampled less often. If this is the case, then I think MLT is ultimately biased.
Wednesday, February 17, 2010
World Peace
Would that be a good thing? I think there would be a big risk of stagnation and decay.
Sunday, February 14, 2010
Wavefront rendering
So, my idea was to take each emitter mesh, and propagate a single wavefront out through the scene. The mesh would be simplified as it propagated (retopologising, perhaps using Delauney triangulation). Once the wavefront was at a low enough intensity, it would not be reflected. The camera would then either receive all wavefronts on an image plane (which could potentially be stored as a hologram) or just raytrace the lit scene (seemed similar to radiosity).
Such a scheme would be able to store polarisation and phase in the wavefront, and thus calculate interference effects at surfaces (if previous wavefronts that hit the surface were recorded), and diffraction around barriers would be possible as well.
The problem with this approach is complexity. An area light at the top of a Cornell box is square. The left side sends light to the right, and the right side sends light to the left. A single mesh is not able to capture that much information -- my approach above was too simplistic.
The next step, then, is to make each part of the mesh emit spherical waves. We could then propagate them using the Huygens-Kirchoff principle if we cared about diffraction effects. This gets very complicated, as we almost need to store the state of light throughout the volume of interest, at a resolution good enough to observe interference effects (otherwise there's not much point using secondary waves at all). If we do not use secondary waves during propagation, but merely propagate the spherical waves outward, then this is a very complicated way of doing photon mapping.
So I conclude that this method, while interesting, is not practical, except for very specific scenes which may require such modelling.
Diffraction and interference are probably still better done storing and propagating phase with rays and image pixels - e.g. having 8 images, each storing the accumulated intensity for photons with a certain phase, and combining them to show interference effects at the end of rendering. Actually that sounds kind of cool, I'll have to try that one day. Diffraction could be done by using fuzzy intersection code and bending rays a random amount toward an edge when they went past an edge.
Edit: Someone's already thought of this, and called it Beam tracing.
Coanda effect helicopters
The idea is patented in the US; electric versions may not last long; it would be easy to have several and recharge them while others are flying.
I suspect the main challenge (after licensing) is in the control software. You'd either need very experienced pilots, or a good control system. A system that had the camera mounted with a gyro for stability like those old bomber turrets in a swivel ball would make things a lot easier for the pilot.
In case the above link is broken, I am referring to helicopters with dome-shaped bodies and a small blade on top that pushes air around the body; they fly as a result of the Coanda effect (the same one that most aeroplane wings use: faster air = lower pressure), as discussed on Slashdot.
Tuesday, February 09, 2010
solid state QC fabrication daydreaming
The best strategy for regular arrays involves natural alignment through chemistry of some sort, for example if donors could be made to repel each other over some range, that would be very useful.
An alternative is some sort of nano-periodic structure that can be filled in in some kind of regular fashion and then etched away.
Perhaps a long biological molecule could be periodic on the scale required, and laid flat and straight on a substrate? The unwanted bits could then be removed, and crystal grown around the remainder..
Saturday, February 06, 2010
So yeah

I just finished this game,
Friday, January 29, 2010
2up page formatting with pages scaled better
Two 2 pages per sheet ps document (convert pdf to ps with ps2pdf), with page borders reduced by 1cm:
psnup -2 infile.ps outfile-2up.ps -Pletter -pa4 -b-1cm
-P input paper size
-p output paper size
-b border (margin) change
Changing different borders by different amounts is more complicated but can be done with pstops, and is left as an exercise for the reader.
Sunday, January 17, 2010
Because I forgot how to type unicode characters
Applications that use newer GTK+ libraries (which includes all applications written for Gnome) require a "U" before the Unicode digits. Either of the following sequences should work:
Ctrl-Shift-U, hex codes, Spacebar
Hold down Ctrl-Shift, U, hex codes, release Ctrl-Shift
Sunday, December 27, 2009
Sunday, December 20, 2009
Ubuntu, OpenCL and NVIDIA
Find a driver with OpenCL support: 195.17 works (but later ones do not). Download it by searching nvidia's site, or try here.
This step is very important: Disable Ubuntu's hardware drivers if you have enabled them. System -> Administration -> Hardware Drivers.
sudo apt-get install build-essential
Now ctrl+alt+F1 to switch to a terminal; sudo stop gdm to kill Xorg; cd ~/Downloads; chmod 700 cudadriver*; sudo ./cudadriver*. Accept all the default options, including installing 32bit libs if you're on a 64bit system and resetting your xorg.conf. I had to copy /usr/lib32/libglut* to /usr/lib. sudo apt-get --reinstall install freeglut3 freeglut3-dev. sudo start gdm. You're all set.
Wednesday, December 02, 2009
Things to do
I say this because I've seen several times now the need for a user defined paragraph style, such as "Example" or "Exercise" or "Answer". This could potentially be solved by having a style editor? This might turn out to be a considerable amount of work.
Also, however, it needs simple replacement macros. An example I use a lot is \termdef{index item} which makes the index item text bold and adds an index entry. This kind of speed is not available to Lyx users. I suppose this is more of a variation on the noun/emphasis theme - user defined versions of these with custom Tex macros would be sufficient for this usage.
The Next Great Copyright Battle
2011 - Book sharing websites become popular.
2011 - Copyright infringement of books skyrockets. Seriously, you haven't seen anything yet.
2012 - Ebook makers build in or software update to automatic copyright protection for non-DRMed books, with phone-home functionality. "Make an example" lawsuits by publishers' associations begin.
2012 - Ebook readers without the ability to phone home enjoy a surge in sales. Crackers teach how to destroy aerials or crack firmware of popular models. Ebook readers stop working unless they can check in with their maker regularly.
2013 - ??? Who will win? Free Culture or Big Business?
Unlike musicians, book authors cannot make a lot of money out of performances. They (and their publishers) currently depend heavily on book sales to earn money.
One way to severely reduce piracy would be to make the books very cheap, like 1/100th of a day's wages. This would make the few minutes spent finding books for free uneconomical. If this was the case, DRM would almost be unnecessary. This doesn't work for smaller-market books like textbooks.
Perhaps a collaborative effort will produce good cc textbooks by then anyway, here's hoping! Actually it looks like there are quite a lot of good texts already, they just need to get noticed!
An alternative model for textbook authors is that used by Sean Carroll. Lecture notes are posted online, and satisfy course requirements; students who want a more complete treatment can buy the expanded textbook. I think this is a good model, but it doesn't work for fiction.
Thursday, November 26, 2009
Thritical Cinking
Saturday, November 21, 2009
Picnic Food
I want more picnics. I'm writing things down now so next time I don't have to think up a list of food.
strawberries/other berries/nuts + chocolate dip / yoghurt / hot nutella
dry biscuits / bread + soft cheese / hard cheese / dips
sliced ham / twiggy sticks / cabana sausage
watermelon / sliced apple / sweet oranges
small double-layer sandwiches - mayonnaise egg tuna ham gherkins beetroot
hot chicken / potato salad / sausage rolls
Friday, November 13, 2009
Thursday, November 12, 2009
Geant4 and SRIM
Using Geant4.9.3.b01 and the standardNR physics list, my quick accuracy test gave an ion range for P-31 at 10keV (very low energy in Geant4 terms) into NIST-parameterized Si of 15nm versus SRIM-2008's 17nm (monolayer mode). Both give rms values of about 5-6nm.
To get energies and positions of transmitted particles requires some editing of the C++ code.
Why am I doing this? SRIM only does layers of material, I'm trying to model a more complicated geometry.
Thursday, October 01, 2009
X Sharing Screens
When I pop up with my laptop to discuss with a colleague, after a while I might do on their computer:xhost +mylaptopnameand on my laptop I do:x2x thecomputername:0 -westThen suddenly my mouse can go over the two computers, my keyboard works on both as well, and I can even copy-paste between the two computers. It looks like the two computers got united. In a flash, newbies get a new idea of what means unix and X ;-
sudo apt-get install x2x xhost +desktop-ip
ssh laptop-ip -XC x2x -west -to :0.0Your desktop now controls both screens.