Skip to content

Commit

Permalink
details
Browse files Browse the repository at this point in the history
  • Loading branch information
stla committed Oct 7, 2023
1 parent 5296423 commit bc1f0f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
10 changes: 5 additions & 5 deletions inst/essais/Enneper-checkerboard2/Enneper-checkerboard2.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ rmesh <- mesh$getMesh()
rmesh[["material"]] <- list("color" = checkerboard)
```

```{r plotDCPcheckerboardNoCorners}
```{r plotDCPcheckerboardNoCorners, eval=FALSE}
# plot ####
open3d(windowRect = 50 + c(0, 0, 512, 512), zoom = 0.8)
bg3d("#363940")
shade3d(rmesh, meshColor = "vertices", polygon_offset = 1)
shade3d(b, lwd = 4)
shade3d(bndry, lwd = 4)
```

![](./figures/EnneperCheckerboard_NoCorners.png)
Expand Down Expand Up @@ -195,7 +195,7 @@ diametrically opposite on the circle:
We rotate the circle in order to bring these two points to the north and
south poles:

```{r rotation}
```{r rotation, eval=FALSE}
uv1 <- UV[vz1, ]
uv2 <- UV[vz2, ]
alpha <- atan2(uv2[1L]-uv1[1L], uv2[2L]-uv1[2L])
Expand All @@ -214,7 +214,7 @@ Vrot <- UVrot[, 2L]

Now we can do the rotated checkerboard:

```{r rotatedCheckeboard}
```{r rotatedCheckeboard, eval=FALSE}
Un <- (Urot - min(Urot)) / (max(Urot) - min(Urot))
Vn <- (Vrot - min(Vrot)) / (max(Vrot) - min(Vrot))
checkerboard <- ifelse(
Expand Down Expand Up @@ -244,7 +244,7 @@ Perfectly "aligned" and symmetric.
It's not easy to decide which one is better on this example, the DCP with
the four fixed corners or the ARAP?

I applied the same steps for the two halves of the two halves of the
I applied the same steps for the two halves of the
[tennis ball](https://laustep.github.io/stlahblog/posts/TennisBall.html),
and the decision was clear for this example: ARAP is better, because it
minimizes the distortion the squares whereas DCP distorts them into
Expand Down
6 changes: 2 additions & 4 deletions vignettes/parameterizations.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,10 @@ It is not very obvious to see, but the right angles are not distorted
(an angle on a curved surface is the angle between the tangents).
In fact, the boundaries of the yellow and blue squares form the *Villarceau
circles* of the torus, shown in black on the following picture, and which are
known to meet at right angles.
known to meet at right angles for the square torus.

![](Villarceau.png)



Now we come back to the Enneper surface and we will use **CGAL**. Let's convert
the **rgl** mesh to a `cgalMesh` mesh and let's have a look at the edge lengths:

Expand All @@ -221,7 +219,7 @@ summary(mesh$getEdges()[["length"]])

If I constructed a parameterization with **CGAL** on this mesh to map the
checkerboard, it would have irregular lines because there's not enough faces.
Then we use an isotropic remeshing to get smaller faces:
Then we perform an isotropic remeshing to get smaller faces:

```{r isotropicRemeshing}
mesh$isotropicRemeshing(
Expand Down

0 comments on commit bc1f0f4

Please sign in to comment.