Best regards, Igor
Do you have a sample dataset? The algorithms for triangulating a signed distance field can be found in Meshing.jl. I implemented Marching Cubes recently and started Marching Squares today, but have yet to tag a release because I need to settle on an API.
I currently am working on solid modeling via implicit functions. More generally I work in digital fabrication (Fab Lab) and would love to have 3D scanning in the Julia workflow. If you can share more about the dataset you have, I'll see if we can make it work with the tools we have available now.
using JLD
using GR
using GR.GR3
points = load("testpts.jld")["pts"]
center = mean(points, 1)
scaling_factor = 1 / maximum([maximum(points[:, i])-minimum(points[:, i]) for i in 1:3])
for i in 1:3
points[:, i] = (points[:, i]-center[i]) * scaling_factor
end
positions = vec(points')
colors = ones(positions)
radii = 0.01*ones(size(points, 1))
GR3.drawspheremesh(size(points, 1), positions, colors, radii)
GR.setviewport(0, 1, 0, 1)
for i in 1:400
GR.clearws()
GR3.cameralookat(2*sin(2π*i/200), 0, 2*cos(2π*i/200), 0, 0, 0, 0, 1, 0)
GR3.drawimage(0, 1, 0, 1, 500, 500, GR3.DRAWABLE_GKS)
GR.updatews()
end
using JLD, Plots
data = load("/home/tom/windowsshared/testpts.jld")
x, y, z = map(i->vec(data["pts"][:,i]), (1,2,3))
scatter3d(x,y,z,m=(3,0.05,stroke(0.1)))