1 ### A Pluto.jl notebook ###
7 # This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
8 macro bind(def, element)
10 local el = $(esc(element))
11 global $(esc(def)) = Core.applicable(Base.get, el) ? Base.get(el) : missing
16 # ╔═╡ 3358d5e0-8e06-11eb-07d6-dd032cc37026
18 using LinearAlgebra, Statistics, Plots, PlutoUI, Images, FileIO
19 default(label = false, minorgrid = true)
23 # ╔═╡ 2d091510-8e06-11eb-024c-ad66088d8267
24 html"<style>main { max-width: 100%; margin-right: 0; }</style>"
26 # ╔═╡ 6f577550-8e07-11eb-3050-59d41656090a
27 @bind reset Button("Reset to default values")
29 # ╔═╡ dd277270-8e06-11eb-028d-6572609606a0
32 md"a: $(@bind a Slider(0:0.01:1; default = 0.5, show_value = true))"
35 # ╔═╡ 4911f142-8e07-11eb-22bd-8f4afc63d60b
38 md"b: $(@bind b Slider(0:0.01:1; default = 0.5, show_value = true))"
41 # ╔═╡ 3abb8d50-8e06-11eb-3403-99d035b3fefb
43 xₜ(t) = 3*a*t*(1-t)^2 + 3*t^2*(1-t) + t^3
44 yₜ(t) = (3-3*b)*t^2 * (1-t) + t^3
45 plot(xₜ, yₜ, 0, 1, aspect_ratio = 1)
49 # ╟─2d091510-8e06-11eb-024c-ad66088d8267
50 # ╟─3358d5e0-8e06-11eb-07d6-dd032cc37026
51 # ╟─dd277270-8e06-11eb-028d-6572609606a0
52 # ╟─4911f142-8e07-11eb-22bd-8f4afc63d60b
53 # ╟─6f577550-8e07-11eb-3050-59d41656090a
54 # ╠═3abb8d50-8e06-11eb-3403-99d035b3fefb