Cool!
colors = to_colormap(:balance)
n = length(colors)
alpha = [ones(n÷3);zeros(n-2*(n÷3));ones(n÷3)]
cmap_alpha = RGBAf0.(colors, alpha)
scene1 = volume(a,algorithm=:absorption,colorrange=(-3,3),colormap=cmap_alpha)
scene2 = volume(a,algorithm=:mip,colorrange=(-3,3),colormap=cmap_alpha)
That’s much improved, but
:absorption
is still muted (the colors are washing together?) and
:mip
still only catches the high range. Is colorrange the wrong parameter for this?
Contours look like this:
scene3 = contour(a.σ,levels=[-3,3],colormap=:balance)
That’s much improved, but :absorption
is still muted (the colors are washing together?) and :mip
still only catches the high range. Is colorrange the wrong parameter for this?
Not sure, this is all not super well tested and used, so quirks are to be expected. I’m not 100% sure what you’re to achieve, so could be either a bug, or just still not the right parameters!
Contours look like this:
Cool! Btw, to make it look more like absorption, you should be able to set e.g alpha=0.5
I’m trying to achieve something like the banner image - I want the vortex structures to be as bright and well defined as possible since they encode a bunch of information about the flow. (And they are pretty.)
Adding alpha=0.2
is nice, but it seems to wipe out the contours near the torus. Maybe because those surfaces have less texture than the contours in the wake?
contour(a.σ,levels=[-6,6],colormap=:balance,alpha=0.2,colorrange=[-7,7])
I’m trying to update the Makie examples in WaterLily.jl, and I’m not sure how to get the 3C camera moves to work with the new Figure
and LScene
stuff.
For example, how can I zoom in on the example in the volume
documentation.
r = LinRange(-1, 1, 100)
cube = [(x.^2 + y.^2 + z.^2) for x = r, y = r, z = r]
cube_with_holes = cube .* (cube .> 1.4)
fig,scene,_=volume(cube_with_holes, algorithm = :iso, isorange = 0.05, isovalue = 1.7)
zoom!(scene,zeros(3),1,true)
ERROR: MethodError: no method matching cameracontrols(::LScene)
Closest candidates are:
cameracontrols(::Scene) at C:\Users\admin\.julia\packages\AbstractPlotting\ek9LT\src\scenes.jl:415
Try
fig, lscene, _ = ...
scene = lscene.scene
and continue from there!
1 Like
Thanks, but I ended up removing it. (This post is two years old.)