Julia 相当于 rgl R 包?
Julia equivalent for rgl R package?
我想知道 Julia 中是否存在大致等同于 R 语言中的 rgl
包的东西;即,允许 dynamic/interactive 表示 3D 绘图、3D 表面等的库
一些背景知识:例如,如果您正在学习形态计量学,您通常会以 PLY format 或 3D 扫描仪生成的其他格式结束文件。例如,在 R 中,您可以(以交互方式)轻松地可视化由此类扫描仪(此处为一组臼齿)获取的 3D 表面:
我们目前在 Julia 中有类似的功能吗?如果是这样,我应该使用哪个库?
谢谢!
Makie.jl, specifically via either the GLMakie.jl or WebGLMakie.jl backends, is a good option for interactive plots. For instance, the following example from the BeautifulMakie gallery
using GLMakie
let
x = y = LinRange(-2, 2, 51)
z = (-x .* exp.(-x .^ 2 .- (y') .^ 2)) .* 4
zmin, zmax = minimum(z), maximum(z)
cmap = :viridis
fig = Figure(resolution = (900,900))
ax = Axis3(fig, aspect = :data, perspectiveness = 0.5, elevation = π/9,
xzpanelcolor= (:black, 0.75), yzpanelcolor= (:black,0.75),
zgridcolor = :grey, ygridcolor = :grey,xgridcolor = :grey)
surface!(ax, x, y, z, colormap = cmap, colorrange = (zmin, zmax))
xm, ym, zm = minimum(ax.finallimits[])
contour!(ax, x, y, z, levels = 20, colormap = cmap, linewidth = 2,
colorrange=(zmin, zmax), transformation = (:xy, zm))
wireframe!(ax, x, y, z, overdraw = true, transparency = true,
color = (:black, 0.1))
fig[1,1] = ax
fig
end
打开一个可以随光标随意旋转的交互式window。
不过我不熟悉 PLY 格式,所以无法对问题的这方面发表评论。
我想知道 Julia 中是否存在大致等同于 R 语言中的 rgl
包的东西;即,允许 dynamic/interactive 表示 3D 绘图、3D 表面等的库
一些背景知识:例如,如果您正在学习形态计量学,您通常会以 PLY format 或 3D 扫描仪生成的其他格式结束文件。例如,在 R 中,您可以(以交互方式)轻松地可视化由此类扫描仪(此处为一组臼齿)获取的 3D 表面:
我们目前在 Julia 中有类似的功能吗?如果是这样,我应该使用哪个库?
谢谢!
Makie.jl, specifically via either the GLMakie.jl or WebGLMakie.jl backends, is a good option for interactive plots. For instance, the following example from the BeautifulMakie gallery
using GLMakie
let
x = y = LinRange(-2, 2, 51)
z = (-x .* exp.(-x .^ 2 .- (y') .^ 2)) .* 4
zmin, zmax = minimum(z), maximum(z)
cmap = :viridis
fig = Figure(resolution = (900,900))
ax = Axis3(fig, aspect = :data, perspectiveness = 0.5, elevation = π/9,
xzpanelcolor= (:black, 0.75), yzpanelcolor= (:black,0.75),
zgridcolor = :grey, ygridcolor = :grey,xgridcolor = :grey)
surface!(ax, x, y, z, colormap = cmap, colorrange = (zmin, zmax))
xm, ym, zm = minimum(ax.finallimits[])
contour!(ax, x, y, z, levels = 20, colormap = cmap, linewidth = 2,
colorrange=(zmin, zmax), transformation = (:xy, zm))
wireframe!(ax, x, y, z, overdraw = true, transparency = true,
color = (:black, 0.1))
fig[1,1] = ax
fig
end
打开一个可以随光标随意旋转的交互式window。
不过我不熟悉 PLY 格式,所以无法对问题的这方面发表评论。