フィルターのクリア

Time Averaged Moire Fringes

18 ビュー (過去 30 日間)
AKANKSHA SHARMA
AKANKSHA SHARMA 2021 年 4 月 30 日
編集済み: Sameer 2024 年 9 月 11 日 6:27
How can I generate time averaged moire fringes?

回答 (1 件)

Sameer
Sameer 2024 年 9 月 11 日 4:01
編集済み: Sameer 2024 年 9 月 11 日 6:27
Hi Akanksha
From my understanding, you want to generate time-averaged "Moiré fringes" using MATLAB. This involves creating interference patterns by superimposing two sets of lines or gratings with a slight relative displacement or rotation.
Below is a MATLAB script that demonstrates how to achieve this:
% Parameters
num_lines = 100; % Number of lines in the grating
line_spacing = 5; % Spacing between lines
angle = 5; % Angle of rotation in degrees
image_size = 500; % Size of the image
% Create a base grating
[x, y] = meshgrid(1:image_size, 1:image_size);
base_grating = sin(2 * pi * (x / line_spacing));
% Create a rotated grating
theta = deg2rad(angle);
x_rot = x * cos(theta) + y * sin(theta);
y_rot = -x * sin(theta) + y * cos(theta);
rotated_grating = sin(2 * pi * (x_rot / line_spacing));
% Combine the gratings to create Moiré pattern
moire_pattern = base_grating + rotated_grating;
% Normalize and display the Moiré pattern
moire_pattern = (moire_pattern - min(moire_pattern(:))) / (max(moire_pattern(:)) - min(moire_pattern(:)));
imshow(moire_pattern, []);
title('Time-Averaged Moiré Fringes');
Hope this helps!

カテゴリ

Help Center および File ExchangeEncryption / Cryptography についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by