Skip to content

Commit a8e38ff

Browse files
committed
CoordinateBoundingBox markdown
1 parent bf6b039 commit a8e38ff

2 files changed

Lines changed: 54 additions & 0 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
## CoordinateBoundingBox
2+
3+
```
4+
CoordinateBoundingBox({{x1,y1,...},{x2,y2,...},{x3,y3,...},...})
5+
```
6+
7+
> calculate the bounding box of the points `{{x1,y1,...},{x2,y2,...},{x3,y3,...},...}`.
8+
9+
```
10+
CoordinateBoundingBox({{x1,y1,...},{x2,y2,...},{x3,y3,...},...}, pad)
11+
```
12+
13+
> add a pad to the calculated bounding box of the points `{{x1,y1,...},{x2,y2,...},{x3,y3,...},...}`.
14+
15+
16+
### Examples
17+
18+
```
19+
>> CoordinateBoundingBox({{0, 1}, {2, 3}, {3,4}, {2, 3}, {1,1}})
20+
{{0,1},{3,4}}
21+
22+
>> CoordinateBoundingBox({{a,b,u}, {c,d,v}, {e,f,w}},Scaled(1/4))
23+
{{Min(a,c,e)+1/4*(-Max(a,c,e)+Min(a,c,e)),Min(b,d,f)+1/4*(-Max(b,d,f)+Min(b,d,f)),Min(u,v,w)+
24+
1/4*(-Max(u,v,w)+Min(u,v,w))},{Max(a,c,e)+1/4*(Max(a,c,e)-Min(a,c,e)),Max(b,d,f)+
25+
1/4*(Max(b,d,f)-Min(b,d,f)),Max(u,v,w)+1/4*(Max(u,v,w)-Min(u,v,w))}}
26+
27+
```
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
## CoordinateBoundingBox
2+
3+
```
4+
CoordinateBoundingBox({{x1,y1,...},{x2,y2,...},{x3,y3,...},...})
5+
```
6+
7+
> calculate the bounding box of the points `{{x1,y1,...},{x2,y2,...},{x3,y3,...},...}`.
8+
9+
```
10+
CoordinateBoundingBox({{x1,y1,...},{x2,y2,...},{x3,y3,...},...}, pad)
11+
```
12+
13+
> add a pad to the calculated bounding box of the points `{{x1,y1,...},{x2,y2,...},{x3,y3,...},...}`.
14+
15+
16+
### Examples
17+
18+
```
19+
>> CoordinateBoundingBox({{0, 1}, {2, 3}, {3,4}, {2, 3}, {1,1}})
20+
{{0,1},{3,4}}
21+
22+
>> CoordinateBoundingBox({{a,b,u}, {c,d,v}, {e,f,w}},Scaled(1/4))
23+
{{Min(a,c,e)+1/4*(-Max(a,c,e)+Min(a,c,e)),Min(b,d,f)+1/4*(-Max(b,d,f)+Min(b,d,f)),Min(u,v,w)+
24+
1/4*(-Max(u,v,w)+Min(u,v,w))},{Max(a,c,e)+1/4*(Max(a,c,e)-Min(a,c,e)),Max(b,d,f)+
25+
1/4*(Max(b,d,f)-Min(b,d,f)),Max(u,v,w)+1/4*(Max(u,v,w)-Min(u,v,w))}}
26+
27+
```

0 commit comments

Comments
 (0)