b=PLreassign(PLorg,PLnew,[thr])
PLorg : | Original point list | |
PLnew : | Final point list | |
thr : | default is 1e-12; |
b : | index list to convert a new index list into original indices |
reassign vertices in a facet list
b=PLreassign(orgPL,newPL)
orgFL=b(newFL)
This function, PLreassign
, is designed to reassign the coordinates of a new list to the indices of an original list. It is particularly useful when working with vertex/point lists in combination with edge or facet lists, where the number of points may be reduced by certain selection algorithms, and a boolean operator resorts the points list of a facet or edge list.
1e-12
. This threshold is used for rounding purposes to ensure numerical stability and precision when comparing points.thr
to 1e-12
. If a third argument is provided, update thr
with this value.PLorg
using the rounddiv
function with the threshold thr
.PLnew
using the rounddiv
function with a fixed threshold of 1e-12
.ismember
function to find the indices of PLnew
in PLorg
. This function checks for membership of rows of PLnew
in PLorg
and returns two outputs: a logical array a
and an index array b
.To reassign vertices in a facet list, you can use the function as follows:
b = PLreassign(orgPL, newPL); orgFL = b(newFL);
In this example, orgPL
is the original point list, newPL
is the new point list, and newFL
is the new facet list. The output b
is used to map newFL
back to the original facet list indices.