setup for *possible* CI rendering
This commit is contained in:
parent
decef62bbb
commit
2739cda456
10
.github/workflows/quarto.yml
vendored
10
.github/workflows/quarto.yml
vendored
@ -6,7 +6,7 @@ name: Quarto Publish to gh-pages
|
||||
on:
|
||||
# Triggers the workflow on push events but only for the "master" branch
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
branches: [ "master" ]
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
@ -26,16 +26,16 @@ jobs:
|
||||
# setup Quarto
|
||||
- uses: quarto-dev/quarto-actions/setup@v2
|
||||
|
||||
# setup Julia
|
||||
- uses: julia-actions/setup-julia@v1
|
||||
- run: julia --project -e 'using Pkg; ENV["PYTHON"]=""; Pkg.add("PyCall"); Pkg.build("PyCall"); Pkg.instantiate(); '
|
||||
|
||||
# setup Python / Jupyter
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
|
||||
- run: pip install jupyter
|
||||
|
||||
# setup Julia
|
||||
- uses: julia-actions/setup-julia@v1
|
||||
- run: julia --project -e 'using Pkg; Pkg.instantiate()'
|
||||
|
||||
# render and push to the gh-pages branch
|
||||
- name: Publish to GitHub Pages (and render)
|
||||
uses: quarto-dev/quarto-actions/publish@v2
|
||||
|
43
Project.toml
Normal file
43
Project.toml
Normal file
@ -0,0 +1,43 @@
|
||||
[deps]
|
||||
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
|
||||
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
|
||||
CalculusWithJulia = "a2e0e22d-7d4c-5312-9169-8b992201a882"
|
||||
Contour = "d38c429a-6771-53c6-b99e-75d170b6e991"
|
||||
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
|
||||
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
|
||||
DualNumbers = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74"
|
||||
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
|
||||
GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a"
|
||||
GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326"
|
||||
HCubature = "19dc6840-f33b-545b-b366-655c7e3ffd49"
|
||||
ImplicitEquations = "95701278-4526-5785-aba3-513cca398f19"
|
||||
Integrals = "de52edbc-65ea-441a-8357-d3a637375a31"
|
||||
IntervalArithmetic = "d1acc4aa-44c8-5952-acd4-ba5d80a2a253"
|
||||
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
|
||||
LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
|
||||
Measures = "442fdcdd-2543-5da2-b0f3-8c86c306513e"
|
||||
Meshing = "e6723b4c-ebff-59f1-b4b7-d97aa5274f73"
|
||||
ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78"
|
||||
Mustache = "ffc61752-8dc7-55ee-8c37-f3e9cdd09e70"
|
||||
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
|
||||
Optimization = "7f7a1694-90dd-40f0-9382-eb1efda571ba"
|
||||
OptimizationOptimJL = "36348300-93cb-4f02-beb5-3c3902f8871e"
|
||||
PlotUtils = "995b91a9-d308-5afd-9ec6-746e21dbc043"
|
||||
PlotlyLight = "ca7969ec-10b3-423e-8d99-40f33abb42bf"
|
||||
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
|
||||
Polynomials = "f27b6e38-b328-58d1-80ce-0feddd5e7a45"
|
||||
Primes = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae"
|
||||
QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
|
||||
RealPolynomialRoots = "87be438c-38ae-47c4-9398-763eabe5c3be"
|
||||
Richardson = "708f8203-808e-40c0-ba2d-98a6953ed40d"
|
||||
Roots = "f2b01f46-fcfa-551c-844a-d8ac1e96c665"
|
||||
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
|
||||
SplitApplyCombine = "03a91e81-4c3e-53e1-a0a4-9c0c8f19dd66"
|
||||
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
|
||||
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
|
||||
SymPy = "24249f21-da20-56a4-8eb1-6a02cf4ae2e6"
|
||||
SymbolicNumericIntegration = "78aadeae-fbc0-11eb-17b6-c7ec0477ba9e"
|
||||
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
|
||||
TaylorSeries = "6aa5eb33-94cf-58f4-a9d0-e4b2c4fc25ea"
|
||||
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
|
||||
UnitfulUS = "7dc9378f-8956-57ef-a780-aa31cc70ff3d"
|
@ -9,7 +9,6 @@ This section uses these add-on packages:
|
||||
```{julia}
|
||||
using CalculusWithJulia
|
||||
using Plots
|
||||
using ImplicitPlots
|
||||
using Roots
|
||||
using SymPy
|
||||
```
|
||||
@ -45,10 +44,10 @@ The **graph** of an equation is just the set of solutions to the equation repres
|
||||
With this definition, the graph of a function $f(x)$ is just the graph of the equation $y = f(x)$. In general, graphing an equation is more complicated than graphing a function. For a function, we know for a given value of $x$ what the corresponding value of $f(x)$ is through evaluation of the function. For equations, we may have $0$, $1$ or more $y$ values for a given $x$ and even more problematic is we may have no rule to find these values.
|
||||
|
||||
|
||||
There are a few options for plotting equations in `Julia`. We will use `ImplicitPlots` in this section, but note both `ImplicitEquations` and `IntervalConstraintProgramming` offer alternatives that are a bit more flexible.
|
||||
There are a few options for plotting equations in `Julia`. We will use a function from the `ImplicitPlots` package that is in the `CalculusWithJulia` package in this section, but note both `ImplicitEquations` and `IntervalConstraintProgramming` offer alternatives that are a bit more flexible.
|
||||
|
||||
|
||||
To plot an implicit equation using `ImplicitPlots` requires expressing the relationship in terms of a function, and then plotting the equation `f(x,y) = 0`. In practice this simply requires all the terms be moved to one side of an equals sign.
|
||||
To plot an implicit equation using `implicit_plot` requires expressing the relationship in terms of a function, and then plotting the equation `f(x,y) = 0`. In practice this simply requires all the terms be moved to one side of an equals sign.
|
||||
|
||||
|
||||
To plot the circle of radius $2$, or the equations $x^2 + y^2 = 2^2$ we would move all terms to one side $x^2 + y^2 - 2^2 = 0$ and then express the left hand side through a function:
|
||||
@ -397,7 +396,7 @@ The use of `lambdify(H)` is needed to turn the symbolic expression, `H`, into a
|
||||
|
||||
:::{.callout-note}
|
||||
## Note
|
||||
While `SymPy` itself has the `plot_implicit` function for plotting implicit equations, this works only with `PyPlot`, not `Plots`, so we use the `ImplicitPlots` package in these examples.
|
||||
While `SymPy` itself has the `plot_implicit` function for plotting implicit equations, this works only with `PyPlot`, not `Plots`, so we use the `implicit_plot` function from the `ImplicitPlots` package in these examples.
|
||||
|
||||
:::
|
||||
|
||||
@ -1081,4 +1080,3 @@ A plot can be made of either the boundary, the interior, or both.
|
||||
#| eval: false
|
||||
plot(region.inner) # plot interior; use r.boundary for boundary
|
||||
```
|
||||
|
||||
|
@ -17,7 +17,6 @@ using Roots
|
||||
#| echo: false
|
||||
#| results: "hidden"
|
||||
using CalculusWithJulia.WeaveSupport
|
||||
using ImplicitPlots
|
||||
|
||||
fig_size = (800, 600)
|
||||
const frontmatter = (
|
||||
@ -1557,5 +1556,3 @@ yesnoq(false)
|
||||
```
|
||||
|
||||
All methods work quickly with this well-behaved problem. In general the convergence rates are slightly different for each, with the Steffensen method matching Newton's method and the difference quotient method being slower in general. All can be more sensitive to the initial guess.
|
||||
|
||||
|
||||
|
@ -698,12 +698,11 @@ f(x, y) = 2 - x^2 + y^2
|
||||
contour(xs, ys, f.(xs, ys'))
|
||||
```
|
||||
|
||||
* An implicit equation. The constraint $f(x,y)=c$ generates an implicit equation. While `contour` can be used for this type of plot - by adjusting the requested contours - the `ImplicitPlots` package does this to make a plot of the equations $f(x,y) = 0$"
|
||||
* An implicit equation. The constraint $f(x,y)=c$ generates an implicit equation. While `contour` can be used for this type of plot - by adjusting the requested contours - the `ImplicitPlots` package does this to make a plot of the equations $f(x,y) = 0$. (The `CalculusWithJulia` package re-uses the `implict_plot` function.)
|
||||
|
||||
|
||||
```{julia}
|
||||
#| hold: true
|
||||
using ImplicitPlots
|
||||
f(x,y) = sin(x*y) - cos(x*y)
|
||||
implicit_plot(f)
|
||||
```
|
||||
@ -1307,4 +1306,3 @@ F(x,y,z) = [x, y, z]
|
||||
ex = F(Phi(u,v)...) ⋅ (Jₚ[:,1] × Jₚ[:,2])
|
||||
integrate(ex, (u,0,1), (v, 0, 2PI))
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user