View source: R/mesh_thicknessMap.R
| mesh_tmap | R Documentation |
This generates a thickness map of an un-split mesh (i.e., we don't know the surfaces) by assigning the mesh vertices to a grid of a given resolution and measuring thickness in each grid cell. Currently the thickness is measured by simply computing the maximum distance between vertices assigned to a given grid cell, so it is important to make sure the grid cells are of a reasonable size given the mesh resolution (i.e., not too small). Setting the ld.cutoff parameter to a small value can help ensure this is the case.
mesh_tmap(mesh.o, base.res, ld.cutoff)
mesh.o |
An oriented mesh3d object |
base.res |
Base resolution requested for the thickness map, in mesh units. This resolution will be used only if the number of cells containing less than 5 values is fewer than the limit specified by the ld.cutoff parameter. Otherwise the resolution will be increased in .1 increments until the condition is met. |
ld.cutoff |
Threshold value (0-1) used to determine the maximum percentage of grid cells that may have fewer than 5 mesh vertices assigned to them. Above this value the resolution of the map will be lowered (i.e. the resolution value will go up, resulting in larger cells). |
A list with the following elements:
res |
Base resolution requested for the thickness map. |
tmap |
Thickness map. A data frame with the following columns: GDIM1, GDIM2, thickness, xpos, ypos, xpos.n, ypos.n. |
Implement option to measure using ray tracing.
For an explanation of the GDIM1 and GDIM2 columns in the output thickness map, see the documentation for the addGridInfo function.
The xpos and ypos columns give the coordinates of the top right hand corner of the cell where the thickness was measured.
The xpos.n and ypos.n columns contain the coordinates from the xpos and ypos columns centered on (x = 0, y = 0) and normalized to a maximum distance of 1 from the origin (i.e., x = 0, y = 0).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.