2

I have a data structure that stores 3D structures as a bounding volume hierarchy of spheres and outputs a file containing the 3D coordinates and the radii of the spheres. I'm trying to plot these spheres using Makie.jl, but I've so far been unsuccessful. After extracting the coordinates from the XSLX document I had them stored in and assigning each column to the appropriate variable, I attempted to write a for loop to successively plot each coordinate. But for some reason, the output is always a 2D plot, even though the argument I'm passing uses 3 coordinates. So far I've tried passing the coordinates in as a tuple, iterating through a list of tuples; the code below plots the closest to what I want to end up with (the Stanford Rabbit). What is it that I'm missing, or where am I going wrong? Thanks in advance! (Yes I am new to Julia)

using XLSX, GLMakie

xf = XLSX.readxlsx("BunnySphereTree.xlsx") 

sh = xf["BunnySphereTree"]

x = sh["A"]
y = sh["B"]
z = sh["C"]
r = sh["D"]

leeroy = scatter((x[1],y[1],z[1]))
current_figure()
for i in 2:length(x)
   jenkins = scatter!((x[i], y[i],z[i]))
end
current_figure()

I have also tried to modify the example presented here to fit what I want, but I've so far been unsuccessful. Once again, any help is appreciated and thank you in advance!

0 Answers0