I have an observable vector of ranges and I want a vector of observable ranges so I can call lines
on them. How can I do that?
using WGLMakie, LinearAlgebra, Chain, Compat
c = Observable([5,6,7])
vertices = map(collect, Iterators.product(Iterators.repeated([-1,1],3)...))
edges = @chain vertices begin
Iterators.product(_, _)
collect
filter(Base.splat((v,w)->sort(abs.(v-w))==[0,0,2]), _)
map(x->stack(x; dims=2), _)
end
screenposition((x,y,z)) = [x/z,y/z]
screenpoints = lift(c) do c
map(v->screenposition(v-c), vertices)
end
screenedges = lift(c) do c
map(edges) do e
from, to = mapslices(screenposition, e .- c; dims=1)
from:.01:to
end
end