Hello fellow coders
I’ve used Julia previously, presently
though, I’m attempting to set up three
IDES .
In particular; VSCode, Codium and Geany.
As I’m using Ubuntu, for Geany I’ve set
the Edit,Preferences,Tools,Terminal to:
gnome-terminal -e “/bin/sh %c”
As I have libvte installed I set
Edit,Preferences,Terminal to:
Execute programs in the VTE
Now having done that I’m able to run the following
Julia script in Geany :
using Random
using GLMakie
GLMakie.activate!()
Makie.inline!(false) # Probably unnecessary?
function scatters_in_3D()
Random.seed!(123)
n = 10
x, y, z = randn(n), randn(n), randn(n)
aspect=(1, 1, 1)
perspectiveness=0.5
# the figure
fig = Figure(; resolution=(1200, 400))
ax1 = Axis3(fig[1, 1]; aspect, perspectiveness)
ax2 = Axis3(fig[1, 2]; aspect, perspectiveness)
ax3 = Axis3(fig[1, 3]; aspect=:data, perspectiveness)
scatter!(ax1, x, y, z; markersize=15)
meshscatter!(ax2, x, y, z; markersize=0.25)
hm = meshscatter!(ax3, x, y, z; markersize=0.25,
marker=Rect3f(Vec3f(0), Vec3f(1)), color=1:n,
colormap=:plasma, transparency=false)
Colorbar(fig[1, 4], hm, label=“values”, height=Relative(0.5))
colgap!(fig.layout, 5)
display(fig)
end
scatters_in_3D()
sleep(200) # may not be necessary
However this Julia script, within Geany,
doesn’t produce the expected graphical output :
using FileIO
using GLMakie
brain = load(assetpath(“brain.stl”))
GLMakie.activate!(inline=false)
fig = Figure(; resolution = (1000, 1000))
fig.mesh(
brain,
color = [tri[1][2] for tri in brain for i in 1:3],
colormap = Reverse(:Spectral),
figure = (resolution = (1000, 1000),)
)
#msh
display(fig)
sleep(200) # may not be necessary
exit()
Likely due to my unfamiliarity with the mesh
command.
Any suggestions ?