4
$\begingroup$

I would like to mesh a cylinder surface. The mesh should include given cylinderpoints which lie on a helix.

My attempt using "IncludePoints"

zyl = ImplicitRegion[x^2 + y^2 == 1 && -Pi <= z <= Pi, {x, y, z}]
heli = ParametricRegion[{Cos[3 phi], Sin[3 phi],phi}, {{phi, -Pi, Pi}}]

Show[{Region[zyl], Region[Style[heli, {Thickness[Large], Red}]] }]

enter image description here

some points of the helix

heliP = Map[#[[1]] &, MeshPrimitives[DiscretizeRegion[heli], 0] ];

elementmesh

mesh = ToBoundaryMesh[zyl, "MeshElementType" -> "TriangleElement" , 
"MeshOrder" -> 1, "IncludePoints" -> heliP , "MaxCellMeasure" -> 1
]

Show[{mesh["Wireframe"], Graphics3D[{Red, Point[heliP]}]}]

enter image description here

Plot shows the complete triangle mesh, unfortunately the points of the helix(red) are no meshpoints!

What's wrong with my approach? Thanks!

$\endgroup$
16
  • 3
    $\begingroup$ I'm looking for the data structure "elementmesh" $\endgroup$ Nov 8, 2023 at 22:13
  • 1
    $\begingroup$ @user21 Thanks for your comment. "Fullelement" mesh means space and element dimension must be the same? $\endgroup$ Nov 9, 2023 at 7:33
  • 1
    $\begingroup$ how does the option "MaxCellMeasure"->1 affect the outcome? @user21: the documentation says otherwise $\endgroup$ Nov 9, 2023 at 9:24
  • 1
    $\begingroup$ @UlrichNeumann, maybe something like addVertex from this q/a? $\endgroup$
    – kglr
    Nov 9, 2023 at 20:52
  • 1
    $\begingroup$ @user21: reference.wolfram.com/language/FEMDocumentation/ref/… at Option IncludePoints it is clearly written, that "These additional points are considered to be part of the boundary, but need not be on the actual boundary." $\endgroup$ Nov 10, 2023 at 10:08

2 Answers 2

4
$\begingroup$

Another method to achieve helical mesh.

m = 15;
ParametricPlot3D[{Cos[u], Sin[u], v}, {u, 0, 2 \[Pi]}, {v, 0, 
  2 \[Pi]}, MeshFunctions -> {#4 + #5 &}, Mesh -> 2 m + 1, 
 Boxed -> False, Axes -> False]
ParametricPlot3D[{Cos[u], Sin[u], v}, {u, 0, 2 \[Pi]}, {v, 0, 
  2 \[Pi]}, MeshFunctions -> {#4 + #5 &, #4 - #5 &}, Mesh -> 2 m + 1, 
 Boxed -> False, Axes -> False]
ParametricPlot3D[{Cos[u], Sin[u], v}, {u, 0, 2 \[Pi]}, {v, 0, 
  2 \[Pi]}, MeshFunctions -> {#4 + #5 &, #4 - #5 &, #4 &, #5 &}, 
 Mesh -> 2 m + 1, Boxed -> False, Axes -> False]

enter image description here

enter image description here

enter image description here

$\endgroup$
3
  • 1
    $\begingroup$ The question is about generation an ElementMesh, how do you propose to move from your answer to that? $\endgroup$
    – user21
    Nov 9, 2023 at 1:33
  • 1
    $\begingroup$ @user21: The OP original title/question: "How to mesh a cylinder with helix points?". That is what my answer provides - a helix mesh of a cylinder. $\endgroup$ Nov 9, 2023 at 10:12
  • 1
    $\begingroup$ -1. This is a question and answer site not a title and answer site. So you read a title of a book and you know the content? $\endgroup$
    – user21
    Nov 9, 2023 at 16:31
2
$\begingroup$
       ParametricPlot3D[{40 Cos[ \[Phi]], 40 Sin[ \[Phi]], 
           z + 2.85 \[Phi] }, {\[Phi], 0, 2 \[Pi]}, {z, -100, 100}, 
                Mesh -> { 0, 10}, 
                    MeshStyle -> Directive[{ Red, Thickness[0.01]}], 
                  Boxed -> False]

Helixed cylinder

$\endgroup$
1
  • 1
    $\begingroup$ Thanks for your effort, but I asked for a special meshing of a cylinder. $\endgroup$ Nov 8, 2023 at 21:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.