Gravity Progress Report #1

Here I’ll post about all results made before January 14th.

Look of the game right now:

Sandbox (I can’t call it even game) looks very robust, dirty and awful. This picture is posted only as a remainder how did it look in very early stages. Things I was able to accomplish:

  • Mirror dynamics – flat mirror reflects laser beam with the respect to the laws of reflection
  • The independence of laser beam – program’s beam creation is only in the laser source (black box on the right side of a picture). Any other beam is created automatically. This gives player the freedom of setting as many mirrors as she wants to.
  • Gravity reversal – my first idea (and the working name of the game) was to give player the ability to reverse gravity. Unfortunately, it went with the cost of prepared before player character dynamics – to be able to set gravity in any given direction I had to rewrite whole dynamics from the scratch. This gave also some bugs that I’ll have to repair. For now player character is able to detect walls, floor and ceiling and stop before them.

TODO’s in the nearest future:

  • Change of the laser beam – for now I just use a debug line to picture laser beam. This is almost a spit in the eye knowing how beautiful could be effects in Unreal Engine. I plan to change laser beam into some evolving particle model. In my mind it looks kinda like this:

  •  Total independence of the laser beam – for now laser beam is a separate actor, but any laser line is an actor itself. The mechanism of spawning new line – in example, after reflecting from mirror – is inside Optical Instrument class itself. I plan to change that into laser beam taking the data from Optical Instrument and spawning new line itself, without engaging instrument itself.
  •  Ability to change a position of any optical instrument – When I describe my project to someone I compare it as a “Minecraft in optics lab”. For me, Minecraft is great game and it’s cube mechanism is very clever – even if it imposes strict physics mechanism to the world. I rather prefer to make more realistic depiction of physics, but the rules of setting world elements can follow Minecraft rules – i.e. ability to set and build parts of the laboratory in strict cubes of space. Because optics geometry needs some freedom, I’ll probably add the ability to change both rotation and location of mirrors and lenses, but with the respect to the basic Minecraft rules.
  • Probably some play of world light – another great ability of Unreal Engine is amazing lightwork. It would be a sin not to use it in game about optics. The real optics labs needs total darkness – of course I don’t need to follow this rule, but I think that good lighting of whole system could be amazing.
  • Of course, instruments models – because I’m not very good at modelling I’ll wait with that.

For now it’s everything – I have many things in mind but I can’t describe them all here in one post. I’ll add new things in the future!

Cheshire Cat

Research #1

After few months I came back to my grant project in quantum simulations. For now the main goal is to simulate the following equation in three dimensions:

The biggest issue is the singularity in 1/R. There is something more – I have never simulated such complicated equation, so I started from something much much easier – the equations for free quantum particle in space.

 After this (having very simple evolution) I checked if version with separated variables ( psi = f + i g) gives the same solution:

Now I’m trying again to obtain same results with another change of coordinate system: psi = R exp(i Theta). There are some problems, unfortunately…

Because of desperation, I changed the system into one dimensional space, where I have bigger control. Still, the last pair of equations are difficult to simulate. I suspect that it can be partially of troublesome behaviour of theta variable – it is something I call periodical variable, which is given with the error of 2 pi. That generates wrong behaviour in getting the derivative – sometimes small change of argument generates great change of function value. I have a method to get rid of it, in changing a definition of theta derivative:

This way I can remove a discontinuity in theta.