tweaks
This commit is contained in:
@@ -373,7 +373,7 @@ surface(xs, ys, zs)
|
||||
:::{.callout-note}
|
||||
## Note
|
||||
The above may not work with all backends for `Plots`, even if those that support 3D graphics.
|
||||
:::
|
||||
:::
|
||||
|
||||
For convenience, the `plot_parametric` function from `CalculusWithJulia` can produce these plots using interval notation, `a..b`, and a function:
|
||||
|
||||
@@ -384,6 +384,31 @@ F(theta, phi) = [X(1, theta, phi), Y(1, theta, phi), Z(1, theta, phi)]
|
||||
plot_parametric(0..pi, 0..pi/2, F)
|
||||
```
|
||||
|
||||
##### Example, the general cone
|
||||
|
||||
The general equation of cone consists of a vertex, $V$, and a base curve. The cone consists of all line segments connecting $V$ to the base curve, here parameterized and in the $x-y$ plane: $r(u) = \langle x(u), y(u), 0 \rangle$. The equations for the cone are:
|
||||
|
||||
$$
|
||||
\frac{x - V_x}{x(u)-V_x} = \frac{y - V_y}{y(u)-V_y} = \frac{z - V_z}{z(u)-V_z} = t,
|
||||
$$
|
||||
|
||||
where $t \in [0,1]$ This gives a vector-valued function
|
||||
|
||||
$$
|
||||
F(u, t) = t * (r(u) - V) + V, \quad \alpha \leq u \leq \beta, 0 \leq t \leq 1.
|
||||
$$
|
||||
|
||||
To illustrate, we have:
|
||||
|
||||
```{julia}
|
||||
# cf. https://discourse.julialang.org/t/general-plotting-code-for-cone-in-3d-with-glmakie-or-plots/92104/3
|
||||
|
||||
basecurve(u) = [cos(u), sin(u) + sin(u/2), 0]
|
||||
Vertex = [0, 3/4, 3]
|
||||
Cone(u, t) = t * (basecurve(u) - Vertex) + Vertex
|
||||
plot_parametric(0..2pi, 0..1, Cone)
|
||||
```
|
||||
|
||||
### Plotting F(x,y, z) = c
|
||||
|
||||
|
||||
|
||||
@@ -232,6 +232,7 @@ plot_parametric(0..2pi, f, legend=false)
|
||||
scatter!([0],[0], markersize=4)
|
||||
```
|
||||
|
||||
|
||||
##### Example
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user