Scilab Function
Last update : November 2005

cgal_dt2_insert_points - Insert new points in dt2.

Calling Sequence

cgal_dt2_insert_points(ptr,new_x,new_y);

Parameters

Description

Given a pointer ptr of dt2, cgal_dt2_insert_points(ptr,new_x,new_y) inserts a new points in dt2.

Examples



x = rand(1,10);
y = rand(1,10);
[tri1,ptr] = cgal_delaunay_2(x,y);

[nbtri,nb] = size(tri1);
tri = [tri1 tri1(:,1)];
clf();
for k = 1:nbtri
plot2d(x(tri(k,:)),y(tri(k,:)),style = 2);
end   
new_x = rand(1,10);
new_y = rand(1,10);  
cgal_dt2_insert_points(ptr,new_x,new_y);
new_tri = cgal_dt2_get_connectivity(ptr);

[nbtri,nb] = size(new_tri);
tri = [new_tri new_tri(:,1)];
clf();
X=[x new_x];
Y=[y new_y];
for k = 1:nbtri
plot2d(X(tri(k,:)),Y(tri(k,:)),style = 2);
end 
cgal_dt2_delete(ptr,"ptr");

 
  

See Also

cgal_delaunay_2 ,   cgal_dt2_get_connectivity ,   cgal_dt2_remove_points ,   cgal_dt2_delete ,  

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

Authors

Naceur MESKINI.