# Einstein's autograph.
# C. Kankelborg
# Array a contains x and y coordinates, alternating, to draw some shape.
# The definition of a is simply copy-pasted from a .fig file. All I had to add
# were the square brackets around the array, the ellipses for line continuation, 
# and the semicolon at the end.
a =     [18750 6075 18000 6600 18150 6900 18750 6750 19500 6375 19875 5925 ...
	 20025 5550 20100 5925 20550 6150 20325 6450 19800 6825 19200 7350 ...
	 18750 7875 18525 8250 18525 8775 19125 8850 19800 8850 20250 8550 ...
	 20400 8175 20100 7875 19725 8025 19650 8400 20100 8550 20850 8400 ...
	 21600 8250 21900 8025 21525 8475 21450 8775 22275 8550 23175 8325 ...
	 23475 8025 23175 8550 22950 8700 23850 8325 24300 8025 24300 8250 ...
	 24000 8625 24375 8775 24975 8625 25500 8250 26100 8100 26025 7950 ...
	 25875 8700 25500 8925 25575 8625 26400 8550 27000 7875 27375 7500 ...
	 27750 7050 27975 6900 27375 7800 27225 8250 27300 8550 27750 8550 ...
	 28200 8250 28200 7725 27675 6750 26850 6375 28425 6300 29175 6225 ...
	 30750 6075 27150 6450 27975 6900 28200 7875 28050 8550 28875 8325 ...
	 29325 7800 29325 7425 28950 7875 28725 8100 28875 8400 29550 8400 ...
	 29925 8250 30450 8100 30300 8400 30225 8700 30750 8625 31275 8400 ...
	 31800 7950 31650 8250 31575 8475 32025 8400 32400 8175 32925 8100 ...
	 33150 8025 32925 8325 32700 8550 32850 8775 33150 8700 33300 8625];
# a = round( 255 * a/max(a) ); # Rescale 0-255, integers only.
N = (size(a))(2); # Number of elements in array a
j=1; # Index for x and y coordinate arrays
for i=1:2:N
   x(j) = a(i);
   y(j) = a(i+1);
   j++;
endfor
scale = 255/(max(x) - min(x));
x = scale * (x - min(x)); # x now rescaled 0-255.
y *= scale; # scale y to match scale of x.
y = 255-y; # Turn Einstein right side up.
y = y + 128 - round(mean(y)); # y now centered at y=128.

# Make all values integers:
x = round(x);
y = round(y);

figure(1);
plot(x,y, 'o-');
save Einstein3.mat x y


