-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
385 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
# PlaneGeomety | ||
# PlaneGeomety.jl | ||
|
||
This is collection used in my [blog post](https://newptcai.github.io/category/math.html) on using | ||
Julia to prove some basic plane geometry theorems. | ||
![Napoleon's Theorem](docs/src/assets/PlaneGeometry.svg) | ||
|
||
This package originated from a [blog post](https://newptcai.github.io/category/math.html) I wrote on | ||
proving Napoleon's theorem with Julia. I have since cleaned up the code and add a [new | ||
theorem](https://newptcai.github.io/PlaneGeometry.jl/theorem/Centroid/). Please see [the document](https://newptcai.github.io/PlaneGeometry.jl/) for | ||
details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Centroid Exists Theorem | ||
|
||
See [Napoleon's Theorem](Napoleon.md) for an example with more explanations. | ||
|
||
```@setup 1 | ||
using | ||
PlaneGeometry, | ||
PlaneGeometry.Theorems, | ||
PlaneGeometry.Theorems.Napoleon, | ||
Plots | ||
``` | ||
|
||
```@contents | ||
Pages = ["Centroid.md"] | ||
``` | ||
|
||
## The Theorem | ||
|
||
```@docs | ||
PlaneGeometry.Theorems.Centroid | ||
``` | ||
|
||
## Finding the centroid and medians | ||
|
||
```@docs | ||
centroid | ||
``` | ||
```@example 1 | ||
@code_md centroid(Triangle()) # hide | ||
``` | ||
|
||
## Examples | ||
|
||
```@docs | ||
centroid_draw(::Triangle) | ||
``` | ||
|
||
```@example 1 | ||
A = Point(0,0); B = Point(1, 3); C = Point(4,2) | ||
plt, hold = centroid_draw(A, B, C) | ||
does_thmhold(hold) | ||
savefig("centroid-plot-1.svg"); nothing # hide | ||
``` | ||
|
||
![centroid-plot-1.svg](centroid-plot-1.svg) | ||
|
||
```@docs | ||
centroid_rand() | ||
``` | ||
|
||
```@example 1 | ||
plt, hold = centroid_rand() | ||
does_thmhold(hold) | ||
savefig("centroid-plot-2.svg"); nothing # hide | ||
``` | ||
![centroid-plot-2.svg](centroid-plot-2.svg) | ||
|
||
```@example 1 | ||
plt, hold = centroid_rand() | ||
does_thmhold(hold) | ||
savefig("centroid-plot-3.svg"); nothing # hide | ||
``` | ||
![centroid-plot-3.svg](centroid-plot-3.svg) | ||
|
||
## Proof | ||
|
||
```@example 1 | ||
@code_md centroid_proof() # hide | ||
``` | ||
|
||
```@example 1 | ||
does_thmhold(centroid_proof()) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.