You can add a new geometry in Meshes.jl in a PR, and it will automatically work with the GeoTable, viz, etc.
You can already do that by creating Ray
and Pyramid
geometries for example. You can place all these geometries into a GeometrySet
and that will be a valid Domain
. The Mesh
is a specific subtype of Domain
that is described in terms of vertices
, connectivities
, etc.
julia> using Meshes
julia> r = rand(Ray{3,Float64})
Ray{3,Float64}
├─ p: Point(0.8544621114647082, 0.007290166206372128, 0.8953959324059896)
└─ v: Vec(0.9568652328665942, 0.611726781018889, 0.27683459777111596)
julia> p = rand(Pyramid{3,Float64})
Pyramid{3,Float64}
├─ Point(0.5245605139763986, 0.31180747839374345, 0.8006794534270958)
├─ Point(0.17999965079093627, 0.2960387752699939, 0.23121858402483375)
├─ Point(0.16164742029403556, 0.5896417963031546, 0.0005634795956463989)
├─ Point(0.5200829045516021, 0.23759556572538754, 0.36635011529535155)
└─ Point(0.8140821418410266, 0.522107532502354, 0.5031798558753174)
julia> d = GeometrySet([r, p])
2 GeometrySet{3,Float64}
├─ Ray(p: (0.854462, 0.00729017, 0.895396), v: (0.956865, 0.611727, 0.276835))
└─ Pyramid((0.524561, 0.311807, 0.800679), ..., (0.814082, 0.522108, 0.50318))
julia> import GLMakie as Mke
julia> viz(rand(Ray{3,Float64}, 100))
Here is the full recipe to plot a PointSet
, which is constructed when you ask to viz
the vertices
of the mesh:
We simply call Makie.scatter
with the overdraw=true
keyword to address issues with large point sets, see Hide stroke in 3D scatter using Makie.jl.
The CoordinateTransform
is a special case of GeometricTransform
that simply applies the same function to each point of the domain individually. These transforms are defined in terms of parameters, they do not live in the columns of the GeoTable
. If you want to design a transform that takes both the values
and the domain
of the GeoTable
, then you are after a general TableTransform
. See the hierarchy of transforms here: Transforms · GeoStats.jl
I think the easiest way forward is to start adding missing geometries in Meshes.jl, then trying to visualize them. After that, we can come up with higher-level transforms that meet your requirements, and a find a good home for them. Meshes.jl only defines GeometricTransform
that act on the domain
only, they don’t have access to the table of features.