Is it possible to make a 2D slider ?? In the following code I would like to have a circle in a rectangle that I can drag around instead of 2 different sliders.
How would you do that ?
using GLMakie
fig = Figure()
sl_ang = Slider(fig[1, 1], range = -pi:0.01:pi, startvalue = 0)
sl_k = Slider(fig[2, 1], range = 0:0.01:5, startvalue = 1)
f(x,y,z,k,v) = sin(k*cos(v)*x)*sin(k*sin(v)*y)*sinh(k*z)
xs, ys, zs = [-10:0.1:10 for d in range(1,3)]
vol = lift(sl_ang.value, sl_k.value) do v,k
[f(x,y,z,k,v) for x in xs, y in xs, z in zs]
end
ax = Axis3(fig[3,1])
volume!(xs,ys,zs,vol; colormap=:redsblues, colorrange=(-1000,1000),algorithm=:absorption)
display(fig)