****The desired effect should be images that look like something out of Star Wars like when you are boosting to high speeds in the Millennium Falcon.****
This problem was tackled by Daniel Weiskopf in his paper An Image-Based Approach to Special Relativistic Rendering the useful maths background is on page 2-4 where the "aberration effect stuff" is on page 4 and with the generated images being on page 5.
- I basically want to be able to create the exact same resulting images by using mathematica as the programming language instead.
- I am certain that the way to do this is using the ImageTransformation command and would thus like to put this aberration equation correctly into the command to get the same image deformations.
To summarise the main information I think is needed:
The relativistic aberration equation is an equation which shows the distortion to geometry occurred by traveling at relativistic (speed close to speed of light).This is a consequence of special relativity. This "geometric change" is given as an angular equation which relates an angle in the moving observers frame relative to an observer at rest. Apologies I am still getting used to using this so not entirely sure how I can show you but I can explain. Since this geometric effect is given by an equation I basically tried using ImageTransformation
to transform an image using the aberration equation as the "function"
The relativistic aberration equation can be cast as:
$$\cos \theta_{obs} = \frac{\cos \theta_{src} - \frac{v}{c}}{1 - \frac{v}{c} \cos\theta_{src}}$$
Or in Mathematica code:
aberrationTheta[q_, s_] :=
ArcCos[(Cos[q] - s)/(1 - (s) Cos[q])]
where s
is a fraction of the speed of light.
The steps which I was trying to do to get this effect working (to no avail) were:
Somehow define some spherical coordinates for the image $(\theta^{\prime}, \phi^{\prime})$ where the prime denotes we are in the observers frame and non prime which would be the object (image) frame. Also making sure the origin of the coordinate system is in located in the center of every input image rather than at a vertex of an image to allow for the deformation effect to fully work. The reasons for these "different frames" is we can imagine ourselves travelling at high speed (boosting) into the image and thus a reference frame allows us to see these effects in the eyes of us actually moving but also the image itself. These transformations are effectively allowing us to "transform" between the 2 reference frames (ours and the image).
Each pixel in the image is given a coordinate in our system, these individual "pixel" coordinates are then transformed by the aberration effect. Since the ImageTransformation command only allows individual pixels of the image to be transformed in cartesian format $(x,y) ->(x^{'},y^{'})$ where x,y represent cartesian coordinates. I tried to express the aberration effect by some cartesian coordinate transform to these spherical coordinates: $x=\theta\cos{\phi}$ and $y=\theta\sin{\phi}$ are the original and after transformation we have $x^{'}=\theta^{'}\cos{\phi}$ and $y^{'}=\theta^{'}\sin{\phi}$ where the prime denotes in "transformed reference frame". The $\phi$ is the angle from the x-axis (range $0-2\pi$) and $\theta$ is the angle from the z-axis ($0-\pi$) (since an image is 2-d we can define the y coordinate as being up and down and the x being right and left and the positive z being "into the image").
Once this is done we can somehow plug these transformations in (not too sure how) along with some image (Any 2D image) into the ImageTransformation[] command and get some output as to what the "new" deformed image looks like.
Note: My main aim is just to get a general code so that I can play around with arbitrary values for say $\beta$ the fraction of the speed of light to see what the effect would be at different speeds.
Would appreciate someone showing code for how this can be done in the most efficient manner using ImageTransformation
with the function which does the transforming being the relativistic aberration equation to produce output images of this geometric deformation.