Generating an unstructured triangle grid

Hi, I’m trying to generate an unstructured triangle grid with an area constraint for data defined on irregular polygonal domains. I have coordinate data for the boundaries of two polygons respectively and for measuring points within those polygons. I now need to generate a triangular grid between the measuring points, preferably using the Triangulate.jl package, but I couldn’t find out how to do so.

I’ve found this bit of code and inserted my data, however it doesn’t actually show me a plot, even though the function runs without error.

function example_domain_bcdt_area(; maxarea = 0.05)

    triin = Triangulate.TriangulateIO()

 #I've substituted the values below with my measuring point data 
    triin.pointlist = Matrix{Cdouble}(\[0.0 0.0; 1.0 0.0; 1.0 1.0; 0.6 0.6; 0.0 1.0\]')

#I've subsituted the values below with my polygon boundaries
    triin.segmentlist = Matrix{Cint}(\[1 2; 2 3; 3 4; 4 5; 5 1\]')

    triin.segmentmarkerlist = Vector{Int32}(\[1, 2, 3, 4, 5\])

    area = sprint("%.15f", maxarea)

    (triout, vorout) = triangulate("pa$(area)DQ", triin)

    return plot_in_out(

        triin,

        triout;

        circumcircles = true,

    )

end;

I’m not sure if this is the right way to go about it, or whether I’ve inserted my data in the right places. Is there maybe a different/easier way to generate a triangular grid for my data points that will give me a plotted output? Thank you in advance for the help :slight_smile: