• Remix
  • Share
  • New Entry

  • Karl

  • /
  • Extraterrestrial signal

on 3 Nov 2024
  • 24
  • 120
  • 0
  • 1
  • 862
Cite your audio source here (if applicable):
drawframe(1);
Write your drawframe function below
function drawframe(f)
% DRAWFRAME Draw a frame for an animation.
%
% The animation is created by looping back and forth through different
% intensity ranges of a single image of randomly generated intensity
% values, taking the Radon transform for each range. The result
% is perhaps suggestive of an extraterrestrial signal.
% Define number of frames,
% and generate the image of random intesity values
% from which each frame will be created.
persistent nframe nxy im1
if isempty(im1)
nframe = 96;
nxy = 128;
rng(1, "twister");
im1 = rand(nxy);
end
% Define lower and upper limits of intensity range
% for current frame.
dv = 2 / nframe;
if f <= nframe / 2
v1 = (f - 1) * dv;
else
v1 = (nframe - f) * dv;
end
v2 = v1 + dv;
% Create sinogram for the current intensity range.
im2 = im1;
im2(im2<v1) = 0;
im2(im2>v2) = 0;
sinogram = rescale(imresize(radon(im2), size(im2)));
axes(Position=[0, 0, 1, 1])
imshow(sinogram)
end
Movie
Audio

This submission does not have audio.

Remix Tree