-
-
Save jlchan/833c7b085149500bbd2e79c7a227cf07 to your computer and use it in GitHub Desktop.
testing Meshing.jl w/GeometryBasics
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Pkg; Pkg.activate(temp=true); Pkg.add("Meshing"); Pkg.add("GeometryBasics"); Pkg.add("FileIO") | |
using Meshing | |
using GeometryBasics | |
using LinearAlgebra: dot, norm | |
using FileIO | |
# Mesh an equation of sphere in the Axis-Aligned Bounding box starting | |
# at -1,-1,-1 and widths of 2,2,2 using Marching Cubes | |
m = GLNormalMesh(Rect(Vec(-1,-1,-1.), Vec(2,2,2.)), MarchingCubes()) do v | |
sqrt(sum(dot(v,v))) - 1 | |
end | |
# save the Sphere as a PLY file | |
save("sphere.ply",m) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment