×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Random perturbed uniform mesh in Matlab....

Random perturbed uniform mesh in Matlab....

Random perturbed uniform mesh in Matlab....

(OP)
Hey guys and gals,
I am trying to generate a random perturbed mesh in Matlab and I an having a bit of problems. Does anyone know any good references that I can use to get an Algorithm or even some sample Matlab code.Or in general any suggestions at all will be welcomed.
Can't wait to see what you'll come up with..

Tony

RE: Random perturbed uniform mesh in Matlab....

Do you mean a simple rectangular grid whos nodes are shifted in some direction by small random amounts?

A little more information would be useful

M

--
Dr Michael F Platten

RE: Random perturbed uniform mesh in Matlab....

(OP)
yes Mickey..you hit the nail on the head.Each small quadrilateral therefore becomes distorted..
Tony

RE: Random perturbed uniform mesh in Matlab....

Try this

CODE

% define the undeformed mesh
x = [1:10];
y = [1:20];
[X,Y] = meshgrid(x,y);
% define some constant z values (for 3-D plotting)
Z = zeros(length(y),length(x));
% plot the undeformed mesh
figure;
subplot(1,2,1);
mesh(X,Y,Z);
axis([0 11 0 21 -1 1]);
view([0,0,1]);
title('Unperturbed Mesh');
% define the random perturbations
X_rand = (rand(length(y),length(x))-0.5)./3;
Y_rand = (rand(length(y),length(x))-0.5)./3;
% perturb the mesh
X_p = X+X_rand;
Y_p = Y+Y_rand;
% plot the deformed mesh
subplot(1,2,2);
mesh(X_p,Y_p,Z);
axis([0 11 0 21 -1 1]);
view([0,0,1]);
title('Perturbed Mesh');
M

--
Dr Michael F Platten

RE: Random perturbed uniform mesh in Matlab....

(OP)
I must say Mickey.....you are good at what you do ...

Thanks a million

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now