Closed aribal2018 closed 11 months ago
Correct, OceanMesh relies on random number generation for the initial point creation following the DistMesh algorithm. You can however fix the seeds using https://www.mathworks.com/help/matlab/ref/rng.html
You can plot node numbers on the mesh yourself after plotting the mesh. By default doing that would overload the graphic and make inspection difficult for even small scale meshes.
To achieve this in MATLAB, you will utilize the text function to annotate your plot with the indices of the points.
m.plot('type','tri','proj','none');
hold on;
% Annotating each point with its index
for i = 1:size(m.p, 1)
text(m.p(i, 1), m.p(i, 2), num2str(i), 'VerticalAlignment','bottom','HorizontalAlignment','right');
end
Thanks Keith. Have a great weekend.
Hi All,
It seems to me that number of nodes and elements obtained from OceanMesh2D are slightly random. When I rerun the setup, I will get different number of nodes and elements.
Is the any way to produce exactly the same nodes and elements for the same setup?
Another thing is, can we plot node numbers on the top of the mesh please. By doing this, the node can be easily identified.
Thank you very much. Best regards, Agustinus