- /
- 
        Quasicrystal Tapestry Animated
        on 18 Oct 2024
        
        
 
    - 19
- 128
- 1
- 2
- 184
 Cite your audio source here (if applicable): 
drawframe(1);
 Write your drawframe function below
function drawframe(f)
    % Quasicrystal animation via summation of plane waves
    % Based on my File Exchange submission:
    % https://mathworks.com/matlabcentral/fileexchnage/56593
    N = 800;            % Dimension of output image
    s = 20;             % Scale - number of periods per wave
    m = 7;              % Integer number of plane waves to sum (m-fold symmetry)
    p = (f-1)*pi/16;    % Phase parameter - vary to animate output
    % Scaled x-coordinate data
    x = ones(N, 1)*(-1:2/(N-1):1)*pi*s;
    % Sum m plane waves over [0,pi)
    q = 0;
    for a = (0:m-1)*pi/m
        q = q+cos(x*cos(a)+x'*sin(a)+p);
    end
    % Wrap output to [0,1] and apply colormap
    imshow((cos(q+2)+1)/2, 'Border', 'tight', 'Colormap', jet);
end
Movie
Audio
This submission does not have audio.


 

 
             
            