feat: finish hw2
This commit is contained in:
parent
2870d40f6b
commit
4b3fafc1d9
BIN
HW2/1_1_1.png
Normal file
BIN
HW2/1_1_1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 45 KiB |
BIN
HW2/1_2_1.png
Normal file
BIN
HW2/1_2_1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
BIN
HW2/2_2_2.png
Normal file
BIN
HW2/2_2_2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
1029
HW2/HW2.html
Normal file
1029
HW2/HW2.html
Normal file
File diff suppressed because one or more lines are too long
72
HW2/HW2.md
Normal file
72
HW2/HW2.md
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
# HW2
|
||||||
|
## Problem 1
|
||||||
|
- 1.
|
||||||
|
Points:
|
||||||
|
| index | position |
|
||||||
|
| ----- | -------- |
|
||||||
|
| 0 | (3, 1) |
|
||||||
|
| 1 | (4, 4) |
|
||||||
|
| 2 | (5, -1) |
|
||||||
|
| 3 | (2, -1) |
|
||||||
|
| 4 | (2, 2) |
|
||||||
|
| 5 | (2, 1) |
|
||||||
|
| 6 | (4, -1) |
|
||||||
|
| 7 | (6, 1) |
|
||||||
|
| 8 | (8, 1) |
|
||||||
|
| 9 | (8, 5) |
|
||||||
|
| 10 | (7, 4) |
|
||||||
|
| 11 | (3, 3) |
|
||||||
|
|
||||||
|
Afer sorting:
|
||||||
|
| index | position | deleted |
|
||||||
|
| ----- | -------- | ------- |
|
||||||
|
| 2 | (5, -1) | False |
|
||||||
|
| 8 | (8, 1) | False |
|
||||||
|
| 7 | (6, 1) | True |
|
||||||
|
| 9 | (8, 5) | False |
|
||||||
|
| 10 | (7, 4) | False |
|
||||||
|
| 1 | (4, 4) | False |
|
||||||
|
| 11 | (3, 3) | False |
|
||||||
|
| 0 | (3, 1) | True |
|
||||||
|
| 4 | (2, 2) | False |
|
||||||
|
| 5 | (2, 1) | False |
|
||||||
|
| 6 | (4, -1) | True |
|
||||||
|
| 3 | (2, -1) | False |
|
||||||
|
|
||||||
|
Stack history:
|
||||||
|
| i | stack |
|
||||||
|
| --- | ----------- |
|
||||||
|
| 2 | 8,2 |
|
||||||
|
| 3 | 9,8,2 |
|
||||||
|
| 4 | 10,9,8,2 |
|
||||||
|
| 4 | 9,8,2 |
|
||||||
|
| 5 | 1,9,8,2 |
|
||||||
|
| 6 | 11,1,9,8,2 |
|
||||||
|
| 6 | 1,9,8,2 |
|
||||||
|
| 7 | 4,1,9,8,2 |
|
||||||
|
| 8 | 5,4,1,9,8,2 |
|
||||||
|
| 8 | 4,1,9,8,2 |
|
||||||
|
| 9 | 3,4,1,9,8,2 |
|
||||||
|
|
||||||
|
image:
|
||||||
|
![1_1_1](1_1_1.png)
|
||||||
|
- 2.
|
||||||
|
- 1. Because the stack only iterate through points once and exactly once, one point either push in or push in then pop out which take constant time k. So the total time is k*n which is O(n).
|
||||||
|
- 2. Consider a square ABDC, $p_0$ and $p_1$ is A and B. Then we go to C and push it. Then D, however B-C-D makes a right turn so we pop C then push D. Then we form a convex polygon with points A,B,D, but C is not inside the polygon.
|
||||||
|
![1_2_1](1_2_1.png)
|
||||||
|
|
||||||
|
## Problem 2
|
||||||
|
- 1.
|
||||||
|
- QuickHull(p9 , p3 , {p0 , p1, p2 , p4, p5 , p6, p7 , p8, p10 , p 11, p12 })
|
||||||
|
- QuickHull(p9 , p5 , {p4 , p11, p8 , p10})
|
||||||
|
- QuickHull(p9 , p11 , {p4})
|
||||||
|
- QuickHull(p11 , p5 , {p10})
|
||||||
|
- QuickHull(p5 , p3 , {p6 , p7, p1})
|
||||||
|
- QuickHull(p7 , p3 , {p1})
|
||||||
|
- 2.
|
||||||
|
- 1. Correct, this is basically the same as Graham scan.
|
||||||
|
- 2. Wrong, counter example, c is the smallese angle but c is not a part of convex hull.
|
||||||
|
![2_2_2](2_2_2.png)
|
||||||
|
- 3. Correct, base on Akl–Toussaint heuristic, for a set of points, the one with the highest y coordinate must be a part of the convex hull.
|
||||||
|
- 4. Correct, this is a Ellipse with same focuses but different axis. The one with longer axis must contain the one with shorter axis but not vise versa. Thus, the point with highest sum must be a part of convex hull.
|
||||||
|
- 5. Wrong, same graph as question 2, C is the one with minimal distance sum however it is not a part of convex hull.
|
BIN
HW2/HW2.pdf
Normal file
BIN
HW2/HW2.pdf
Normal file
Binary file not shown.
368
HW2/hw2-graham-scan.ipe
Normal file
368
HW2/hw2-graham-scan.ipe
Normal file
|
@ -0,0 +1,368 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!DOCTYPE ipe SYSTEM "ipe.dtd">
|
||||||
|
<ipe version="70218" creator="Ipe 7.2.26">
|
||||||
|
<info created="D:20220918182244" modified="D:20220918190855"/>
|
||||||
|
<ipestyle name="basic">
|
||||||
|
<symbol name="arrow/arc(spx)">
|
||||||
|
<path stroke="sym-stroke" fill="sym-stroke" pen="sym-pen">
|
||||||
|
0 0 m
|
||||||
|
-1 0.333 l
|
||||||
|
-1 -0.333 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="arrow/farc(spx)">
|
||||||
|
<path stroke="sym-stroke" fill="white" pen="sym-pen">
|
||||||
|
0 0 m
|
||||||
|
-1 0.333 l
|
||||||
|
-1 -0.333 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="arrow/ptarc(spx)">
|
||||||
|
<path stroke="sym-stroke" fill="sym-stroke" pen="sym-pen">
|
||||||
|
0 0 m
|
||||||
|
-1 0.333 l
|
||||||
|
-0.8 0 l
|
||||||
|
-1 -0.333 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="arrow/fptarc(spx)">
|
||||||
|
<path stroke="sym-stroke" fill="white" pen="sym-pen">
|
||||||
|
0 0 m
|
||||||
|
-1 0.333 l
|
||||||
|
-0.8 0 l
|
||||||
|
-1 -0.333 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="mark/circle(sx)" transformations="translations">
|
||||||
|
<path fill="sym-stroke">
|
||||||
|
0.6 0 0 0.6 0 0 e
|
||||||
|
0.4 0 0 0.4 0 0 e
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="mark/disk(sx)" transformations="translations">
|
||||||
|
<path fill="sym-stroke">
|
||||||
|
0.6 0 0 0.6 0 0 e
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="mark/fdisk(sfx)" transformations="translations">
|
||||||
|
<group>
|
||||||
|
<path fill="sym-fill">
|
||||||
|
0.5 0 0 0.5 0 0 e
|
||||||
|
</path>
|
||||||
|
<path fill="sym-stroke" fillrule="eofill">
|
||||||
|
0.6 0 0 0.6 0 0 e
|
||||||
|
0.4 0 0 0.4 0 0 e
|
||||||
|
</path>
|
||||||
|
</group>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="mark/box(sx)" transformations="translations">
|
||||||
|
<path fill="sym-stroke" fillrule="eofill">
|
||||||
|
-0.6 -0.6 m
|
||||||
|
0.6 -0.6 l
|
||||||
|
0.6 0.6 l
|
||||||
|
-0.6 0.6 l
|
||||||
|
h
|
||||||
|
-0.4 -0.4 m
|
||||||
|
0.4 -0.4 l
|
||||||
|
0.4 0.4 l
|
||||||
|
-0.4 0.4 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="mark/square(sx)" transformations="translations">
|
||||||
|
<path fill="sym-stroke">
|
||||||
|
-0.6 -0.6 m
|
||||||
|
0.6 -0.6 l
|
||||||
|
0.6 0.6 l
|
||||||
|
-0.6 0.6 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="mark/fsquare(sfx)" transformations="translations">
|
||||||
|
<group>
|
||||||
|
<path fill="sym-fill">
|
||||||
|
-0.5 -0.5 m
|
||||||
|
0.5 -0.5 l
|
||||||
|
0.5 0.5 l
|
||||||
|
-0.5 0.5 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
<path fill="sym-stroke" fillrule="eofill">
|
||||||
|
-0.6 -0.6 m
|
||||||
|
0.6 -0.6 l
|
||||||
|
0.6 0.6 l
|
||||||
|
-0.6 0.6 l
|
||||||
|
h
|
||||||
|
-0.4 -0.4 m
|
||||||
|
0.4 -0.4 l
|
||||||
|
0.4 0.4 l
|
||||||
|
-0.4 0.4 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</group>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="mark/cross(sx)" transformations="translations">
|
||||||
|
<group>
|
||||||
|
<path fill="sym-stroke">
|
||||||
|
-0.43 -0.57 m
|
||||||
|
0.57 0.43 l
|
||||||
|
0.43 0.57 l
|
||||||
|
-0.57 -0.43 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
<path fill="sym-stroke">
|
||||||
|
-0.43 0.57 m
|
||||||
|
0.57 -0.43 l
|
||||||
|
0.43 -0.57 l
|
||||||
|
-0.57 0.43 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</group>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="arrow/fnormal(spx)">
|
||||||
|
<path stroke="sym-stroke" fill="white" pen="sym-pen">
|
||||||
|
0 0 m
|
||||||
|
-1 0.333 l
|
||||||
|
-1 -0.333 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="arrow/pointed(spx)">
|
||||||
|
<path stroke="sym-stroke" fill="sym-stroke" pen="sym-pen">
|
||||||
|
0 0 m
|
||||||
|
-1 0.333 l
|
||||||
|
-0.8 0 l
|
||||||
|
-1 -0.333 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="arrow/fpointed(spx)">
|
||||||
|
<path stroke="sym-stroke" fill="white" pen="sym-pen">
|
||||||
|
0 0 m
|
||||||
|
-1 0.333 l
|
||||||
|
-0.8 0 l
|
||||||
|
-1 -0.333 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="arrow/linear(spx)">
|
||||||
|
<path stroke="sym-stroke" pen="sym-pen">
|
||||||
|
-1 0.333 m
|
||||||
|
0 0 l
|
||||||
|
-1 -0.333 l
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="arrow/fdouble(spx)">
|
||||||
|
<path stroke="sym-stroke" fill="white" pen="sym-pen">
|
||||||
|
0 0 m
|
||||||
|
-1 0.333 l
|
||||||
|
-1 -0.333 l
|
||||||
|
h
|
||||||
|
-1 0 m
|
||||||
|
-2 0.333 l
|
||||||
|
-2 -0.333 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="arrow/double(spx)">
|
||||||
|
<path stroke="sym-stroke" fill="sym-stroke" pen="sym-pen">
|
||||||
|
0 0 m
|
||||||
|
-1 0.333 l
|
||||||
|
-1 -0.333 l
|
||||||
|
h
|
||||||
|
-1 0 m
|
||||||
|
-2 0.333 l
|
||||||
|
-2 -0.333 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="arrow/mid-normal(spx)">
|
||||||
|
<path stroke="sym-stroke" fill="sym-stroke" pen="sym-pen">
|
||||||
|
0.5 0 m
|
||||||
|
-0.5 0.333 l
|
||||||
|
-0.5 -0.333 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="arrow/mid-fnormal(spx)">
|
||||||
|
<path stroke="sym-stroke" fill="white" pen="sym-pen">
|
||||||
|
0.5 0 m
|
||||||
|
-0.5 0.333 l
|
||||||
|
-0.5 -0.333 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="arrow/mid-pointed(spx)">
|
||||||
|
<path stroke="sym-stroke" fill="sym-stroke" pen="sym-pen">
|
||||||
|
0.5 0 m
|
||||||
|
-0.5 0.333 l
|
||||||
|
-0.3 0 l
|
||||||
|
-0.5 -0.333 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="arrow/mid-fpointed(spx)">
|
||||||
|
<path stroke="sym-stroke" fill="white" pen="sym-pen">
|
||||||
|
0.5 0 m
|
||||||
|
-0.5 0.333 l
|
||||||
|
-0.3 0 l
|
||||||
|
-0.5 -0.333 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="arrow/mid-double(spx)">
|
||||||
|
<path stroke="sym-stroke" fill="sym-stroke" pen="sym-pen">
|
||||||
|
1 0 m
|
||||||
|
0 0.333 l
|
||||||
|
0 -0.333 l
|
||||||
|
h
|
||||||
|
0 0 m
|
||||||
|
-1 0.333 l
|
||||||
|
-1 -0.333 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="arrow/mid-fdouble(spx)">
|
||||||
|
<path stroke="sym-stroke" fill="white" pen="sym-pen">
|
||||||
|
1 0 m
|
||||||
|
0 0.333 l
|
||||||
|
0 -0.333 l
|
||||||
|
h
|
||||||
|
0 0 m
|
||||||
|
-1 0.333 l
|
||||||
|
-1 -0.333 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<anglesize name="22.5 deg" value="22.5"/>
|
||||||
|
<anglesize name="30 deg" value="30"/>
|
||||||
|
<anglesize name="45 deg" value="45"/>
|
||||||
|
<anglesize name="60 deg" value="60"/>
|
||||||
|
<anglesize name="90 deg" value="90"/>
|
||||||
|
<arrowsize name="large" value="10"/>
|
||||||
|
<arrowsize name="small" value="5"/>
|
||||||
|
<arrowsize name="tiny" value="3"/>
|
||||||
|
<color name="blue" value="0 0 1"/>
|
||||||
|
<color name="brown" value="0.647 0.165 0.165"/>
|
||||||
|
<color name="darkblue" value="0 0 0.545"/>
|
||||||
|
<color name="darkcyan" value="0 0.545 0.545"/>
|
||||||
|
<color name="darkgray" value="0.663"/>
|
||||||
|
<color name="darkgreen" value="0 0.392 0"/>
|
||||||
|
<color name="darkmagenta" value="0.545 0 0.545"/>
|
||||||
|
<color name="darkorange" value="1 0.549 0"/>
|
||||||
|
<color name="darkred" value="0.545 0 0"/>
|
||||||
|
<color name="gold" value="1 0.843 0"/>
|
||||||
|
<color name="gray" value="0.745"/>
|
||||||
|
<color name="green" value="0 1 0"/>
|
||||||
|
<color name="lightblue" value="0.678 0.847 0.902"/>
|
||||||
|
<color name="lightcyan" value="0.878 1 1"/>
|
||||||
|
<color name="lightgray" value="0.827"/>
|
||||||
|
<color name="lightgreen" value="0.565 0.933 0.565"/>
|
||||||
|
<color name="lightyellow" value="1 1 0.878"/>
|
||||||
|
<color name="navy" value="0 0 0.502"/>
|
||||||
|
<color name="orange" value="1 0.647 0"/>
|
||||||
|
<color name="pink" value="1 0.753 0.796"/>
|
||||||
|
<color name="purple" value="0.627 0.125 0.941"/>
|
||||||
|
<color name="red" value="1 0 0"/>
|
||||||
|
<color name="seagreen" value="0.18 0.545 0.341"/>
|
||||||
|
<color name="turquoise" value="0.251 0.878 0.816"/>
|
||||||
|
<color name="violet" value="0.933 0.51 0.933"/>
|
||||||
|
<color name="yellow" value="1 1 0"/>
|
||||||
|
<dashstyle name="dash dot dotted" value="[4 2 1 2 1 2] 0"/>
|
||||||
|
<dashstyle name="dash dotted" value="[4 2 1 2] 0"/>
|
||||||
|
<dashstyle name="dashed" value="[4] 0"/>
|
||||||
|
<dashstyle name="dotted" value="[1 3] 0"/>
|
||||||
|
<gridsize name="10 pts (~3.5 mm)" value="10"/>
|
||||||
|
<gridsize name="14 pts (~5 mm)" value="14"/>
|
||||||
|
<gridsize name="16 pts (~6 mm)" value="16"/>
|
||||||
|
<gridsize name="20 pts (~7 mm)" value="20"/>
|
||||||
|
<gridsize name="28 pts (~10 mm)" value="28"/>
|
||||||
|
<gridsize name="32 pts (~12 mm)" value="32"/>
|
||||||
|
<gridsize name="4 pts" value="4"/>
|
||||||
|
<gridsize name="56 pts (~20 mm)" value="56"/>
|
||||||
|
<gridsize name="8 pts (~3 mm)" value="8"/>
|
||||||
|
<opacity name="10%" value="0.1"/>
|
||||||
|
<opacity name="30%" value="0.3"/>
|
||||||
|
<opacity name="50%" value="0.5"/>
|
||||||
|
<opacity name="75%" value="0.75"/>
|
||||||
|
<pen name="fat" value="1.2"/>
|
||||||
|
<pen name="heavier" value="0.8"/>
|
||||||
|
<pen name="ultrafat" value="2"/>
|
||||||
|
<symbolsize name="large" value="5"/>
|
||||||
|
<symbolsize name="small" value="2"/>
|
||||||
|
<symbolsize name="tiny" value="1.1"/>
|
||||||
|
<textsize name="Huge" value="\Huge"/>
|
||||||
|
<textsize name="LARGE" value="\LARGE"/>
|
||||||
|
<textsize name="Large" value="\Large"/>
|
||||||
|
<textsize name="footnote" value="\footnotesize"/>
|
||||||
|
<textsize name="huge" value="\huge"/>
|
||||||
|
<textsize name="large" value="\large"/>
|
||||||
|
<textsize name="script" value="\scriptsize"/>
|
||||||
|
<textsize name="small" value="\small"/>
|
||||||
|
<textsize name="tiny" value="\tiny"/>
|
||||||
|
<textstyle name="center" begin="\begin{center}" end="\end{center}"/>
|
||||||
|
<textstyle name="item" begin="\begin{itemize}\item{}" end="\end{itemize}"/>
|
||||||
|
<textstyle name="itemize" begin="\begin{itemize}" end="\end{itemize}"/>
|
||||||
|
<tiling name="falling" angle="-60" step="4" width="1"/>
|
||||||
|
<tiling name="rising" angle="30" step="4" width="1"/>
|
||||||
|
</ipestyle>
|
||||||
|
<page>
|
||||||
|
<layer name="alpha"/>
|
||||||
|
<view layers="alpha" active="alpha"/>
|
||||||
|
<text layer="alpha" matrix="1 0 0 1 -128 0" transformations="translations" pos="384 320" stroke="0.667 0 0" type="label" width="7.895" height="11.097" depth="0" valign="baseline" size="LARGE">0</text>
|
||||||
|
<path matrix="1 0 0 1 -32 0" stroke="0.667 0 0" arrow="normal/normal">
|
||||||
|
64 256 m
|
||||||
|
576 256 l
|
||||||
|
</path>
|
||||||
|
<path matrix="1 0 0 1 -128 0" stroke="0.667 0 0" arrow="normal/normal">
|
||||||
|
192 192 m
|
||||||
|
192 576 l
|
||||||
|
</path>
|
||||||
|
<text matrix="1 0 0 1 -128 0" transformations="translations" pos="448 512" stroke="0.667 0 0" type="label" width="7.895" height="11.097" depth="0" valign="baseline" size="LARGE">1</text>
|
||||||
|
<text matrix="1 0 0 1 -128 0" transformations="translations" pos="512 192" stroke="0.667 0 0" type="label" width="7.895" height="11.097" depth="0" valign="baseline" size="LARGE">2</text>
|
||||||
|
<text matrix="1 0 0 1 -128 0" transformations="translations" pos="320 192" stroke="0.667 0 0" type="label" width="7.895" height="11.097" depth="0" valign="baseline" size="LARGE">3</text>
|
||||||
|
<text matrix="1 0 0 1 -128 0" transformations="translations" pos="320 384" stroke="0.667 0 0" type="label" width="7.895" height="11.097" depth="0" valign="baseline" size="LARGE">4</text>
|
||||||
|
<text matrix="1 0 0 1 -128 0" transformations="translations" pos="320 320" stroke="0.667 0 0" type="label" width="7.895" height="11.097" depth="0" valign="baseline" size="LARGE">5</text>
|
||||||
|
<text matrix="1 0 0 1 -128 0" transformations="translations" pos="448 192" stroke="0.667 0 0" type="label" width="7.895" height="11.097" depth="0" valign="baseline" size="LARGE">6</text>
|
||||||
|
<text matrix="1 0 0 1 -128 0" transformations="translations" pos="576 320" stroke="0.667 0 0" type="label" width="7.895" height="11.097" depth="0" valign="baseline" size="LARGE">7</text>
|
||||||
|
<text transformations="translations" pos="576 320" stroke="0.667 0 0" type="label" width="7.895" height="11.097" depth="0" valign="baseline" size="LARGE">8</text>
|
||||||
|
<text transformations="translations" pos="576 576" stroke="0.667 0 0" type="label" width="7.895" height="11.097" depth="0" valign="baseline" size="LARGE">9</text>
|
||||||
|
<text transformations="translations" pos="512 512" stroke="0.667 0 0" type="label" width="15.791" height="11.097" depth="0" valign="baseline" size="LARGE">10</text>
|
||||||
|
<text transformations="translations" pos="256 448" stroke="0.667 0 0" type="label" width="15.791" height="11.097" depth="0" valign="baseline" size="LARGE">11</text>
|
||||||
|
<path stroke="0.667 0 0">
|
||||||
|
384 192 m
|
||||||
|
576 320 l
|
||||||
|
576 576 l
|
||||||
|
320 512 l
|
||||||
|
192 384 l
|
||||||
|
192 192 l
|
||||||
|
384 192 l
|
||||||
|
384 192 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
<text transformations="translations" pos="128 640" stroke="0.667 0 0" type="label" width="11.936" height="11.761" depth="0" valign="baseline" size="LARGE">A</text>
|
||||||
|
<text matrix="1 0 0 1 -16 16" transformations="translations" pos="256 640" stroke="0.667 0 0" type="label" width="11.265" height="11.761" depth="0" valign="baseline" size="LARGE">B</text>
|
||||||
|
<text matrix="1 0 0 1 16 -16" transformations="translations" pos="128 768" stroke="0.667 0 0" type="label" width="11.493" height="11.761" depth="0" valign="baseline" size="LARGE">C</text>
|
||||||
|
<text transformations="translations" pos="256 768" stroke="0.667 0 0" type="label" width="12.164" height="11.761" depth="0" valign="baseline" size="LARGE">D</text>
|
||||||
|
<path stroke="0.667 0 0" arrow="normal/normal">
|
||||||
|
256 768 m
|
||||||
|
128 640 l
|
||||||
|
</path>
|
||||||
|
<path stroke="red" arrow="normal/normal">
|
||||||
|
240 656 m
|
||||||
|
256 768 l
|
||||||
|
</path>
|
||||||
|
<path stroke="red" dash="dotted" arrow="normal/normal">
|
||||||
|
240 656 m
|
||||||
|
144 752 l
|
||||||
|
</path>
|
||||||
|
<path stroke="red" arrow="normal/normal">
|
||||||
|
128 640 m
|
||||||
|
240 656 l
|
||||||
|
</path>
|
||||||
|
</page>
|
||||||
|
</ipe>
|
284
HW2/hw2-quickhull.ipe
Normal file
284
HW2/hw2-quickhull.ipe
Normal file
|
@ -0,0 +1,284 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!DOCTYPE ipe SYSTEM "ipe.dtd">
|
||||||
|
<ipe version="70212" creator="Ipe 7.2.13">
|
||||||
|
<info created="D:20210912132529" modified="D:20220909153350"/>
|
||||||
|
<ipestyle name="basic">
|
||||||
|
<symbol name="arrow/arc(spx)">
|
||||||
|
<path stroke="sym-stroke" fill="sym-stroke" pen="sym-pen">
|
||||||
|
0 0 m
|
||||||
|
-1 0.333 l
|
||||||
|
-1 -0.333 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="arrow/farc(spx)">
|
||||||
|
<path stroke="sym-stroke" fill="white" pen="sym-pen">
|
||||||
|
0 0 m
|
||||||
|
-1 0.333 l
|
||||||
|
-1 -0.333 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="arrow/ptarc(spx)">
|
||||||
|
<path stroke="sym-stroke" fill="sym-stroke" pen="sym-pen">
|
||||||
|
0 0 m
|
||||||
|
-1 0.333 l
|
||||||
|
-0.8 0 l
|
||||||
|
-1 -0.333 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="arrow/fptarc(spx)">
|
||||||
|
<path stroke="sym-stroke" fill="white" pen="sym-pen">
|
||||||
|
0 0 m
|
||||||
|
-1 0.333 l
|
||||||
|
-0.8 0 l
|
||||||
|
-1 -0.333 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="mark/circle(sx)" transformations="translations">
|
||||||
|
<path fill="sym-stroke">
|
||||||
|
0.6 0 0 0.6 0 0 e
|
||||||
|
0.4 0 0 0.4 0 0 e
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="mark/disk(sx)" transformations="translations">
|
||||||
|
<path fill="sym-stroke">
|
||||||
|
0.6 0 0 0.6 0 0 e
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="mark/fdisk(sfx)" transformations="translations">
|
||||||
|
<group>
|
||||||
|
<path fill="sym-fill">
|
||||||
|
0.5 0 0 0.5 0 0 e
|
||||||
|
</path>
|
||||||
|
<path fill="sym-stroke" fillrule="eofill">
|
||||||
|
0.6 0 0 0.6 0 0 e
|
||||||
|
0.4 0 0 0.4 0 0 e
|
||||||
|
</path>
|
||||||
|
</group>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="mark/box(sx)" transformations="translations">
|
||||||
|
<path fill="sym-stroke" fillrule="eofill">
|
||||||
|
-0.6 -0.6 m
|
||||||
|
0.6 -0.6 l
|
||||||
|
0.6 0.6 l
|
||||||
|
-0.6 0.6 l
|
||||||
|
h
|
||||||
|
-0.4 -0.4 m
|
||||||
|
0.4 -0.4 l
|
||||||
|
0.4 0.4 l
|
||||||
|
-0.4 0.4 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="mark/square(sx)" transformations="translations">
|
||||||
|
<path fill="sym-stroke">
|
||||||
|
-0.6 -0.6 m
|
||||||
|
0.6 -0.6 l
|
||||||
|
0.6 0.6 l
|
||||||
|
-0.6 0.6 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="mark/fsquare(sfx)" transformations="translations">
|
||||||
|
<group>
|
||||||
|
<path fill="sym-fill">
|
||||||
|
-0.5 -0.5 m
|
||||||
|
0.5 -0.5 l
|
||||||
|
0.5 0.5 l
|
||||||
|
-0.5 0.5 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
<path fill="sym-stroke" fillrule="eofill">
|
||||||
|
-0.6 -0.6 m
|
||||||
|
0.6 -0.6 l
|
||||||
|
0.6 0.6 l
|
||||||
|
-0.6 0.6 l
|
||||||
|
h
|
||||||
|
-0.4 -0.4 m
|
||||||
|
0.4 -0.4 l
|
||||||
|
0.4 0.4 l
|
||||||
|
-0.4 0.4 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</group>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="mark/cross(sx)" transformations="translations">
|
||||||
|
<group>
|
||||||
|
<path fill="sym-stroke">
|
||||||
|
-0.43 -0.57 m
|
||||||
|
0.57 0.43 l
|
||||||
|
0.43 0.57 l
|
||||||
|
-0.57 -0.43 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
<path fill="sym-stroke">
|
||||||
|
-0.43 0.57 m
|
||||||
|
0.57 -0.43 l
|
||||||
|
0.43 -0.57 l
|
||||||
|
-0.57 0.43 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</group>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="arrow/fnormal(spx)">
|
||||||
|
<path stroke="sym-stroke" fill="white" pen="sym-pen">
|
||||||
|
0 0 m
|
||||||
|
-1 0.333 l
|
||||||
|
-1 -0.333 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="arrow/pointed(spx)">
|
||||||
|
<path stroke="sym-stroke" fill="sym-stroke" pen="sym-pen">
|
||||||
|
0 0 m
|
||||||
|
-1 0.333 l
|
||||||
|
-0.8 0 l
|
||||||
|
-1 -0.333 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="arrow/fpointed(spx)">
|
||||||
|
<path stroke="sym-stroke" fill="white" pen="sym-pen">
|
||||||
|
0 0 m
|
||||||
|
-1 0.333 l
|
||||||
|
-0.8 0 l
|
||||||
|
-1 -0.333 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="arrow/linear(spx)">
|
||||||
|
<path stroke="sym-stroke" pen="sym-pen">
|
||||||
|
-1 0.333 m
|
||||||
|
0 0 l
|
||||||
|
-1 -0.333 l
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="arrow/fdouble(spx)">
|
||||||
|
<path stroke="sym-stroke" fill="white" pen="sym-pen">
|
||||||
|
0 0 m
|
||||||
|
-1 0.333 l
|
||||||
|
-1 -0.333 l
|
||||||
|
h
|
||||||
|
-1 0 m
|
||||||
|
-2 0.333 l
|
||||||
|
-2 -0.333 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<symbol name="arrow/double(spx)">
|
||||||
|
<path stroke="sym-stroke" fill="sym-stroke" pen="sym-pen">
|
||||||
|
0 0 m
|
||||||
|
-1 0.333 l
|
||||||
|
-1 -0.333 l
|
||||||
|
h
|
||||||
|
-1 0 m
|
||||||
|
-2 0.333 l
|
||||||
|
-2 -0.333 l
|
||||||
|
h
|
||||||
|
</path>
|
||||||
|
</symbol>
|
||||||
|
<pen name="heavier" value="0.8"/>
|
||||||
|
<pen name="fat" value="1.2"/>
|
||||||
|
<pen name="ultrafat" value="2"/>
|
||||||
|
<symbolsize name="large" value="5"/>
|
||||||
|
<symbolsize name="small" value="2"/>
|
||||||
|
<symbolsize name="tiny" value="1.1"/>
|
||||||
|
<arrowsize name="large" value="10"/>
|
||||||
|
<arrowsize name="small" value="5"/>
|
||||||
|
<arrowsize name="tiny" value="3"/>
|
||||||
|
<color name="red" value="1 0 0"/>
|
||||||
|
<color name="green" value="0 1 0"/>
|
||||||
|
<color name="blue" value="0 0 1"/>
|
||||||
|
<color name="yellow" value="1 1 0"/>
|
||||||
|
<color name="orange" value="1 0.647 0"/>
|
||||||
|
<color name="gold" value="1 0.843 0"/>
|
||||||
|
<color name="purple" value="0.627 0.125 0.941"/>
|
||||||
|
<color name="gray" value="0.745"/>
|
||||||
|
<color name="brown" value="0.647 0.165 0.165"/>
|
||||||
|
<color name="navy" value="0 0 0.502"/>
|
||||||
|
<color name="pink" value="1 0.753 0.796"/>
|
||||||
|
<color name="seagreen" value="0.18 0.545 0.341"/>
|
||||||
|
<color name="turquoise" value="0.251 0.878 0.816"/>
|
||||||
|
<color name="violet" value="0.933 0.51 0.933"/>
|
||||||
|
<color name="darkblue" value="0 0 0.545"/>
|
||||||
|
<color name="darkcyan" value="0 0.545 0.545"/>
|
||||||
|
<color name="darkgray" value="0.663"/>
|
||||||
|
<color name="darkgreen" value="0 0.392 0"/>
|
||||||
|
<color name="darkmagenta" value="0.545 0 0.545"/>
|
||||||
|
<color name="darkorange" value="1 0.549 0"/>
|
||||||
|
<color name="darkred" value="0.545 0 0"/>
|
||||||
|
<color name="lightblue" value="0.678 0.847 0.902"/>
|
||||||
|
<color name="lightcyan" value="0.878 1 1"/>
|
||||||
|
<color name="lightgray" value="0.827"/>
|
||||||
|
<color name="lightgreen" value="0.565 0.933 0.565"/>
|
||||||
|
<color name="lightyellow" value="1 1 0.878"/>
|
||||||
|
<dashstyle name="dashed" value="[4] 0"/>
|
||||||
|
<dashstyle name="dotted" value="[1 3] 0"/>
|
||||||
|
<dashstyle name="dash dotted" value="[4 2 1 2] 0"/>
|
||||||
|
<dashstyle name="dash dot dotted" value="[4 2 1 2 1 2] 0"/>
|
||||||
|
<textsize name="large" value="\large"/>
|
||||||
|
<textsize name="small" value="\small"/>
|
||||||
|
<textsize name="tiny" value="\tiny"/>
|
||||||
|
<textsize name="Large" value="\Large"/>
|
||||||
|
<textsize name="LARGE" value="\LARGE"/>
|
||||||
|
<textsize name="huge" value="\huge"/>
|
||||||
|
<textsize name="Huge" value="\Huge"/>
|
||||||
|
<textsize name="footnote" value="\footnotesize"/>
|
||||||
|
<textstyle name="center" begin="\begin{center}" end="\end{center}"/>
|
||||||
|
<textstyle name="itemize" begin="\begin{itemize}" end="\end{itemize}"/>
|
||||||
|
<textstyle name="item" begin="\begin{itemize}\item{}" end="\end{itemize}"/>
|
||||||
|
<gridsize name="4 pts" value="4"/>
|
||||||
|
<gridsize name="8 pts (~3 mm)" value="8"/>
|
||||||
|
<gridsize name="16 pts (~6 mm)" value="16"/>
|
||||||
|
<gridsize name="32 pts (~12 mm)" value="32"/>
|
||||||
|
<gridsize name="10 pts (~3.5 mm)" value="10"/>
|
||||||
|
<gridsize name="20 pts (~7 mm)" value="20"/>
|
||||||
|
<gridsize name="14 pts (~5 mm)" value="14"/>
|
||||||
|
<gridsize name="28 pts (~10 mm)" value="28"/>
|
||||||
|
<gridsize name="56 pts (~20 mm)" value="56"/>
|
||||||
|
<anglesize name="90 deg" value="90"/>
|
||||||
|
<anglesize name="60 deg" value="60"/>
|
||||||
|
<anglesize name="45 deg" value="45"/>
|
||||||
|
<anglesize name="30 deg" value="30"/>
|
||||||
|
<anglesize name="22.5 deg" value="22.5"/>
|
||||||
|
<opacity name="10%" value="0.1"/>
|
||||||
|
<opacity name="30%" value="0.3"/>
|
||||||
|
<opacity name="50%" value="0.5"/>
|
||||||
|
<opacity name="75%" value="0.75"/>
|
||||||
|
<tiling name="falling" angle="-60" step="4" width="1"/>
|
||||||
|
<tiling name="rising" angle="30" step="4" width="1"/>
|
||||||
|
</ipestyle>
|
||||||
|
<page>
|
||||||
|
<layer name="alpha"/>
|
||||||
|
<view layers="alpha" active="alpha"/>
|
||||||
|
<use layer="alpha" name="mark/disk(sx)" pos="80 400" size="normal" stroke="black"/>
|
||||||
|
<use name="mark/disk(sx)" pos="496 464" size="normal" stroke="black"/>
|
||||||
|
<use name="mark/disk(sx)" pos="276 536" size="normal" stroke="black"/>
|
||||||
|
<use name="mark/disk(sx)" pos="140 476" size="normal" stroke="black"/>
|
||||||
|
<use name="mark/disk(sx)" pos="352 536" size="normal" stroke="black"/>
|
||||||
|
<use name="mark/disk(sx)" pos="100 436" size="normal" stroke="black"/>
|
||||||
|
<use name="mark/disk(sx)" pos="212 520" size="normal" stroke="black"/>
|
||||||
|
<use name="mark/disk(sx)" pos="468 492" size="normal" stroke="black"/>
|
||||||
|
<use name="mark/disk(sx)" pos="160 472" size="normal" stroke="black"/>
|
||||||
|
<use name="mark/disk(sx)" pos="340 528" size="normal" stroke="black"/>
|
||||||
|
<use matrix="1 0 0 1 24 0" name="mark/disk(sx)" pos="216 472" size="normal" stroke="black"/>
|
||||||
|
<use matrix="1 0 0 1 24 0" name="mark/disk(sx)" pos="352 472" size="normal" stroke="black"/>
|
||||||
|
<text matrix="1 0 0 1 184 152" transformations="translations" pos="82.4696 392.737" stroke="black" type="label" width="7.024" height="9.245" depth="0" valign="baseline" size="Large">5</text>
|
||||||
|
<text matrix="1 0 0 1 -336 4" transformations="translations" pos="501.225 455.954" stroke="black" type="label" width="7.024" height="9.245" depth="0" valign="baseline" size="Large">8</text>
|
||||||
|
<text matrix="1 0 0 1 -220 -128" transformations="translations" pos="282.965 525.631" stroke="black" type="label" width="7.024" height="9.245" depth="0" valign="baseline" size="Large">9</text>
|
||||||
|
<text transformations="translations" pos="360.486 468.182" stroke="black" type="label" width="7.024" height="9.245" depth="0" valign="baseline" size="Large">0</text>
|
||||||
|
<text transformations="translations" pos="224.362 469.797" stroke="black" type="label" width="7.024" height="9.245" depth="0" valign="baseline" size="Large">2</text>
|
||||||
|
<text transformations="translations" pos="461.541 482.717" stroke="black" type="label" width="7.024" height="9.245" depth="0" valign="baseline" size="Large">1</text>
|
||||||
|
<text matrix="1 0 0 1 324 -24" transformations="translations" pos="165.759 473.258" stroke="black" type="label" width="7.024" height="9.245" depth="0" valign="baseline" size="Large">3</text>
|
||||||
|
<text transformations="translations" pos="106.464 432.421" stroke="black" type="label" width="7.024" height="9.245" depth="0" valign="baseline" size="Large">4</text>
|
||||||
|
<text transformations="translations" pos="215.364 513.403" stroke="black" type="label" width="14.047" height="9.245" depth="0" valign="baseline" size="Large">10</text>
|
||||||
|
<text matrix="1 0 0 1 0 -2.99935" transformations="translations" pos="335.338 518.017" stroke="black" type="label" width="7.024" height="9.245" depth="0" valign="baseline" size="Large">6</text>
|
||||||
|
<text transformations="translations" pos="352.873 525.631" stroke="black" type="label" width="7.024" height="9.245" depth="0" valign="baseline" size="Large">7</text>
|
||||||
|
<text transformations="translations" pos="141.534 465.413" stroke="black" type="label" width="14.047" height="9.245" depth="0" valign="baseline" size="Large">11</text>
|
||||||
|
<use matrix="1 0 0 1 -64 -24" name="mark/disk(sx)" pos="352 472" size="normal" stroke="black"/>
|
||||||
|
<text matrix="1 0 0 1 144 -32" transformations="translations" pos="141.534 465.413" stroke="black" type="label" width="14.047" height="9.245" depth="0" valign="baseline" size="Large">12</text>
|
||||||
|
</page>
|
||||||
|
</ipe>
|
Loading…
Reference in New Issue
Block a user