h1

Alcubierre Warp Drive Metric in Matlab

August 29, 2008

Here is some code I wrote to generate the asymmetric spacetime found in the Alcubierre metric. Copy and paste into matlab.

% Warp Drive Metric.
% Richard Obousy August 2007.

k=0

[x, y] = meshgrid([-10:.3:10],[-10:.3:10]);

for i=1:length(x);
    for j=1:length(x);
z(i,j)=-1*(tanh (2*sqrt(abs(x(i,j)^2+y(i,j)^2-16)-5)+3)-tanh(2*sqrt(abs(x(i,j)^2+y(i,j)^2-16)-5)-3))…
*tanh(6)*x(i,j);
    end
   
end

 

mesh(x,y,z)
axis([-10 10 -10 10 -10 10 -10 10])
view([158,26])
colormap(hsv)

 

 
 
 

 
 
 

 

Leave a Comment