Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

12
  • 1
    $\begingroup$ This is close to how i pelting uv maps was done in 3D in the past. Triangulate the mesh then make every edge a spring with rest length at starting length, then force the boundaries to the shape you want (circle) then let the spring dynamics handle the interiors $\endgroup$
    – joojaa
    Commented Jul 15, 2018 at 14:31
  • 1
    $\begingroup$ @joojaa I just wanted to brag around with my classical education ;) Indeed, these things are standard tasks in the domain of texture mapping -- which does not mean that they were easy. The art is to guarantee that there are no flipped triangles. There is much more to it than it would fit into a single post. $\endgroup$ Commented Jul 15, 2018 at 14:34
  • 2
    $\begingroup$ Nice use of the low level FEM functions. You might be interested in bndvertices === dbc["DirichletRows"] and normalprojections === MapThreadDot[ R["BoundaryNormals"][[1]], (gradu @@@ (0.5 (p[[i]] + p[[j]]))).(-J)]. The first part can be done in NDSolve directly, I'd need think about a way to compute the normal for the second part to be done in NDSolve. $\endgroup$
    – user21
    Commented Jul 16, 2018 at 6:33
  • 2
    $\begingroup$ You can also use something like: g = GraphicsRow[{Graphics[{Texture[tex], ElementMeshToGraphicsComplex[R, VertexTextureCoordinates -> texcoords]}], Graphics[{Texture[tex], ElementMeshToGraphicsComplex[R, VertexTextureCoordinates -> texcoords, "CoordinateConversion" -> (f[Sequence @@ ##] & /@ # &)]}]}, ImageSize -> Full] $\endgroup$
    – user21
    Commented Jul 16, 2018 at 6:44
  • 2
    $\begingroup$ @user21 Thank you so much! These tiny give-aways are actually really rewarding. The thing with the normal in the second equation was indeed bugging me for quite some time. Suggestions to simplify that are welcome. $\endgroup$ Commented Jul 16, 2018 at 7:00