-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathboundary_point.m
More file actions
58 lines (45 loc) · 849 Bytes
/
boundary_point.m
File metadata and controls
58 lines (45 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
function [ bool ] = boundary_point(uv,iujv,u_knots,v_knots)
% test if the intersection points lie on the boundary of the patches, whole area
bool = [-1,-1];
uint = [u_knots(iujv(1)+2), u_knots(iujv(1)+3)];
vint = [v_knots(iujv(2)+2), v_knots(iujv(2)+3)];
uv;
if uint(1) == 0
if abs(uv(1)-0)<eps
bool(1) = 0;
end
else
if abs(uv(1)-uint(1))<eps
bool(1) = 1;
end
end
if uint(2) == 1
if abs(uv(1)-1)<eps
bool(1) = 0;
end
else
if abs(uv(1)-uint(2))<eps
bool(1) = 1;
end
end
%%%%
if vint(1) == 0
if abs(uv(2)-0)<eps
bool(2) = 0;
end
else
if abs(uv(2)-vint(1))<eps
bool(2) = 1;
end
end
if vint(2) == 1
if abs(uv(2)-1)<eps
bool(2) = 0;
end
else
if abs(uv(2)-vint(2))<eps
bool(1) = 1;
end
end
%pause
end