Skip to content

Commit

Permalink
don't use Makie
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszbaran committed Jul 1, 2023
1 parent 2728cb0 commit ba93dce
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
2 changes: 0 additions & 2 deletions tutorials/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ BoundaryValueDiffEq = "764a87c0-6b3e-53db-9096-fe964310641d"
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def"
GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a"
IJulia = "7073ff75-c697-5162-941a-fcdaad2a7d2a"
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
Manifolds = "1cead3c2-87b3-11e9-0ccd-23c62b72b94e"
ManifoldsBase = "3362f125-f0bb-47a3-aa74-596ffd7ef2fb"
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
Expand Down
36 changes: 20 additions & 16 deletions tutorials/working-in-charts.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ We will first set up our plot with an empty torus.
`param_points` are points on the surface of the torus that will be used for basic surface shape in `Makie.jl`.
The torus will be colored according to its Gaussian curvature stored in `gcs`. We later want to have a color scale that has negative curvature blue, zero curvature white and positive curvature red so `gcs_mm` is the largest absolute value of the curvature that will be needed to properly set range of curvature values.

In the documentation this tutorial represents a static situation (without interactivity).
In the documentation this tutorial represents a static situation (without interactivity). `Makie.jl` rendering is turned off.

```{julia}
using GLMakie, Makie
GLMakie.activate!()
# using GLMakie, Makie
# GLMakie.activate!()
"""
torus_figure()
Expand Down Expand Up @@ -144,17 +144,19 @@ We also parametrise the start point and direction.
φy = -0.1
geo = solve_for([θₚ, φₚ], [θₓ, φₓ], [θy, φy], t_end)(0.0:dt:t_end)
geo_ps = [Point3f(s[1]) for s in geo]
pt_indices = 1:div(length(geo), 10):length(geo)
geo_ps_pt = [Point3f(s[1]) for s in geo[pt_indices]]
geo_Ys = [Point3f(s[3]) for s in geo[pt_indices]]
ax1, fig1 = torus_figure()
arrows!(ax1, geo_ps_pt, geo_Ys, linewidth=0.05, color=:blue)
lines!(geo_ps; linewidth=4.0, color=:green)
fig1
# geo_ps = [Point3f(s[1]) for s in geo]
# pt_indices = 1:div(length(geo), 10):length(geo)
# geo_ps_pt = [Point3f(s[1]) for s in geo[pt_indices]]
# geo_Ys = [Point3f(s[3]) for s in geo[pt_indices]]
# ax1, fig1 = torus_figure()
# arrows!(ax1, geo_ps_pt, geo_Ys, linewidth=0.05, color=:blue)
# lines!(geo_ps; linewidth=4.0, color=:green)
# fig1
```

![fig-pt]{tutorials/working-in-charts-transport.png}

### Solving the logairthmic map ODE

```{julia}
Expand All @@ -167,9 +169,11 @@ bvp_i = (0, 0)
bvp_a1 = [θ₁, φ₁]
bvp_a2 = [θ₂, φ₂]
bvp_sol = Manifolds.solve_chart_log_bvp(M, bvp_a1, bvp_a2, A, bvp_i)
geo_r = [Point3f(get_point(M, A, bvp_i, p[1:2])) for p in bvp_sol(0.0:0.05:1.0)]
# geo_r = [Point3f(get_point(M, A, bvp_i, p[1:2])) for p in bvp_sol(0.0:0.05:1.0)]
ax2, fig2 = torus_figure()
lines!(geo_r; linewidth=4.0, color=:green)
fig2
# ax2, fig2 = torus_figure()
# lines!(geo_r; linewidth=4.0, color=:green)
# fig2
```

![fig-geodesic]{tutorials/working-in-charts-geodesic.png}

0 comments on commit ba93dce

Please sign in to comment.