-
-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update volumeslices - docs #1123
Conversation
t-bltg
commented
Jul 14, 2021
I think this is pretty useful for visualizing volumetric data :)
x = LinRange(0, π, 50)
y = LinRange(0, 2π, 100)
z = LinRange(0, 3π, 150)
vol = [cos(X)*sin(Y)*sin(Z) for X ∈ x, Y ∈ y, Z ∈ z] That does seem right to me, doesn't it ? |
The input isn't wrong, the planes are flipped ;) |
That still looks right to me, compared to: using GLMakie
main() = begin
fig = Figure(); axes = [Axis(fig[i, 1]) for i ∈ 1:3]
x = LinRange(0, π, 50)
y = LinRange(0, 2π, 100)
z = LinRange(0, 3π, 150)
v = [cos(X)*sin(Y)*sin(Z) for X ∈ x, Y ∈ y, Z ∈ z]
ax = axes[1, 1]
heatmap!(ax, y, z, v[length(x)÷2, :, :])
ax.aspect = DataAspect()
ax.title = "yz plane - x axis"
ax.xlabel = "y"
ax.ylabel = "z"
ax = axes[2, 1]
heatmap!(ax, x, z, v[:, length(y)÷2, :])
ax.aspect = DataAspect()
ax.title = "xz plane - y axis"
ax.xlabel = "x"
ax.ylabel = "z"
ax = axes[3, 1]
heatmap!(ax, x, y, v[:, :, length(z)÷2])
ax.aspect = DataAspect()
ax.title = "xy plane - z axis"
ax.xlabel = "x"
ax.ylabel = "y"
save("heatmap.png", fig)
return
end
main() |
Yeah been there ;) these cos/sin plots are full of symmetries, so there are lots of configurations where they look correct even when wrong! |
Harmonic functions are really useful though 😉 |