- pdegplot: https://www.mathworks.com/help/pde/ug/pdeplot.html
- initmesh: https://www.mathworks.com/help/pde/ug/initmesh.html
- refinemesh: https://www.mathworks.com/help/pde/ug/refinemesh.html
Create structered triangular mesh
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
How to generate a structered mesh triangular so that the connecting segment of center of gravity is orthogonal to the triangle edge ( with minimum of triangle )?
geometrie
pdegplot(g); %
[p,e,t]=initmesh(g);
%[p,e,t]=refinemesh(g,p,e,t);
pdemesh(p,e,t),
0 Commenti
Risposte (1)
Hari
il 13 Nov 2024 alle 3:03
Hi Ali,
I understand that you want to generate a structured triangular mesh where the line connecting the center of gravity of each triangle is orthogonal to the triangle's edges, aiming for minimal triangles.
I assume you are using PDE Toolbox for mesh generation and visualization. Here the steps you can follow:
Define Geometry:
Start by defining the geometry of the domain you want to mesh. You can use the pdegplot function to visualize the geometry
% Define geometry (example: unit circle)
g = decsg([1, 0, 0, 1]'); % Circle with radius 1
pdegplot(g);
Initialize the Mesh: Use the initmesh function to create an initial mesh for your geometry. This function returns the points (p), edges (e), and triangles (t) of the mesh.
% Initialize the mesh
[p, e, t] = initmesh(g);
Refine the Mesh: Optionally, use refinemesh to refine the initial mesh. This step can help in achieving a more structured mesh by increasing the number of triangles.
% Refine the mesh to improve structure
[p, e, t] = refinemesh(g, p, e, t);
Visualize the Mesh: Use the pdemesh function to visualize the generated mesh. This helps in verifying the structure and orthogonality of the mesh.
% Visualize the mesh
pdemesh(p, e, t);
Adjusting Mesh for Orthogonality: Ensuring orthogonality of gravity centers may require custom mesh manipulation, which might not be directly achievable with standard functions. Consider using custom algorithms or manual adjustments for precise control.
Refer to the documentation following functions for more info about them:
Hope this helps!
0 Commenti
Vedere anche
Categorie
Scopri di più su Geometry and Mesh in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!