This commit is contained in:
jverzani
2022-07-20 13:23:19 -04:00
parent a2b62ded04
commit 93c993206a
5 changed files with 12 additions and 8 deletions

View File

@@ -0,0 +1,4 @@
plot([0,1,1,0], [0,0,1,0], aspect_ratio=:equal, legend=false)
plot!(Plots.partialcircle(0, pi/4,100, 0.25), arrow=true)
Δ = 0.05
plot!([1-Δ, 1-Δ, 1], [0,Δ,Δ])

View File

@@ -1,6 +1,6 @@
# Calculus plots with Makie # Calculus plots with Makie
XXX https://www.juliapackages.com/p/implicit3dplotting
## XXX This needs a total rewrite for the new Makie ## XXX This needs a total rewrite for the new Makie
```julia; echo=false; results="hidden" ```julia; echo=false; results="hidden"

View File

@@ -398,7 +398,7 @@ Plot(data, layout)
``` ```
The following example is more complicated use of the elements previously described. It comes mimics an image from [Wikipedia](https://en.wikipedia.org/wiki/List_of_trigonometric_identities) for trigonometric identities. The use of ``\LaTeX`` does not seem to be supported through the `JavaScript` interface; unicode symbols are used instead. The `xanchor` and `yanchor` keys are used to position annotations away from the default. The `textangle` key is used to rotate text, as desired. The following example is more complicated use of the elements previously described. It mimics an image from [Wikipedia](https://en.wikipedia.org/wiki/List_of_trigonometric_identities) for trigonometric identities. The use of ``\LaTeX`` does not seem to be supported through the `JavaScript` interface; unicode symbols are used instead. The `xanchor` and `yanchor` keys are used to position annotations away from the default. The `textangle` key is used to rotate text, as desired.
```julia, hold=true ```julia, hold=true
alpha = pi/6 alpha = pi/6
@@ -533,7 +533,7 @@ The main difference is the chart type, as this is a ``3``-dimensional plot, "sca
### Quiver plots ### Quiver plots
There is no `quiver` plot for `plotly` using JavaScript. In ``2``-dimensions a text-less annotation could be employed. In ``3``-dimensions, the following (from [stackoverflow.com](https://stackoverflow.com/questions/43164909/plotlypython-how-to-plot-arrows-in-3d) is a possible workaround where a line segment is drawn and capped with a small cone. Somewhat opaquely, we use `NamedTuple` for an iterator to create the keys for the data below: There is no `quiver` plot for `plotly` using JavaScript. In ``2``-dimensions a text-less annotation could be employed. In ``3``-dimensions, the following (from [stackoverflow.com](https://stackoverflow.com/questions/43164909/plotlypython-how-to-plot-arrows-in-3d)) is a possible workaround where a line segment is drawn and capped with a small cone. Somewhat opaquely, we use `NamedTuple` for an iterator to create the keys for the data below:
```julia; hold=true ```julia; hold=true

View File

@@ -252,7 +252,7 @@ plot(chain, -1, 1)
How long is the chain? Looking at the graph we can guess an answer is How long is the chain? Looking at the graph we can guess an answer is
between $2$ and $2.5$, say, but it isn't much work to get between $2$ and $2.5$, say, but it isn't much work to get
an approximate numeric answer. Recall, the accompanying `CalculusWithJulia` package deines `f'` to find the derivative using the `ForwardDiff` package. an approximate numeric answer. Recall, the accompanying `CalculusWithJulia` package defines `f'` to find the derivative using the `ForwardDiff` package.
```julia; ```julia;
@@ -310,7 +310,7 @@ compute the length of Johns' catenary in inches:
```julia; hold=true ```julia; hold=true
a = 13 a = 13
b = 118 + a b = 118 + a
f(x) = cat(x, a=13, b=118+13) f(x) = cat(x; a=13, b=118+13)
quadgk(x -> sqrt(1 + f'(x)^2), -78/2, 78/2)[1] quadgk(x -> sqrt(1 + f'(x)^2), -78/2, 78/2)[1]
``` ```

View File

@@ -5,7 +5,7 @@
using CalculusWithJulia using CalculusWithJulia
using CalculusWithJulia.WeaveSupport using CalculusWithJulia.WeaveSupport
const frontmatter = ( frontmatter = (
title = "From calculator to computer", title = "From calculator to computer",
description = "Calculus with Julia: Replacing the calculator with a computer", description = "Calculus with Julia: Replacing the calculator with a computer",
tags = ["CalculusWithJulia", "precalc", "replacing the calculator with a computer"], tags = ["CalculusWithJulia", "precalc", "replacing the calculator with a computer"],
@@ -940,7 +940,7 @@ numericq(val)
What is the value of What is the value of
```math ```math
\frac{sin(pi/3) - 1/2}{pi/3 - pi/6} \frac{\sin(\pi/3) - 1/2}{\pi/3 - \pi/6}
``` ```
```julia; hold=true; echo=false; ```julia; hold=true; echo=false;
@@ -1031,7 +1031,7 @@ radioq(choices, ans)
A twitter post from popular mechanics generated some attention. A twitter post from popular mechanics generated some attention.
![](https://raw.githubusercontent.com/jverzani/CalculusWithJulia.jl/master/CwJ/precalc/figures/order_operations_pop_mech.png) ![](https://raw.githubusercontent.com/jverzani/CalculusWithJuliaNotes.jl/master/CwJ/precalc/figures/order_operations_pop_mech.png)
What is the answer? What is the answer?