<< cdt2_insert_points cglab cdt2_remove_points >>

cglab >> cglab > cdt2_remove_constraints

cdt2_remove_constraints

Remove constraint(s) from cdt2.

Calling Sequence

cdt2_remove_constraints(ptr,C);

Parameters

C
: is (nbconstraints,4) array, Each row of C defines one constrained edge by its two endpoints.
ptr
: is a pointer representing cdt2.

Description

cdt2_remove_constraints(ptr,C) Makes the edges defined by constraints C no longer constrained.

Examples

x = [5 1 6];
y = [2 6 6];
C=[8.    2.     7.    4.;6.    4.5    4.    5.;3.    6.     3.    7.;3.    4.     2.    3.;9.    4.     8.    7.];
[tri,ptr] = constrained_delaunay_2(x,y,C);
cdt2_remove_constraints(ptr,C);
clf();
coord = cdt2_get_coord(ptr);
tri = cdt2_get_connectivity(ptr);
X=coord(:,1)';
Y=coord(:,2)';
[nbtri,nb] = size(tri);
tri = [tri tri(:,1)];
for k = 1:nbtri
plot2d(X(tri(k,:)),Y(tri(k,:)),style = 2);
end
[nbconstraints,nb] = size(C);
for i = 1:nbconstraints
    plot2d([C(i,1) C(i,3)]',[C(i,2) C(i,4)]',style = 3);
    plot2d([C(i,1) C(i,3)]',[C(i,2) C(i,4)]',style = -5);
end
cdt2_delete(ptr,"ptr");

See Also

This function uses the Triangulation_2 package of CGAL, which is under QPL license. See License Terms

Authors


Report an issue
<< cdt2_insert_points cglab cdt2_remove_points >>