How to curve the edges of a PlaneMesh?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By amit

I am generating a mesh and applying a shader material using code only. I am able to create the plane mesh and apply the material but I cannot curve the edges of the mesh. The idea is to create an island with a flat surface with curved edges into the water.
Should this be done using a script or shader?

func _ready() -> void:
randomize()

var size = _rand_int()
print('size :', size)

var surface_tool = SurfaceTool.new()
var plane_mesh = PlaneMesh.new()
var data_tool = MeshDataTool.new()

plane_mesh.size = Vector2(size, size)
plane_mesh.subdivide_depth = size * MULTIPLIER
plane_mesh.subdivide_width = size * MULTIPLIER

surface_tool.begin(Mesh.PRIMITIVE_TRIANGLES)
surface_tool.create_from(plane_mesh, 0)
surface_tool.generate_normals()
var array_mesh = surface_tool.commit()
data_tool.create_from_surface(array_mesh, 0)

var mesh_instance = MeshInstance.new()
mesh_instance.mesh = array_mesh

var ground_material = preload('res://Materials/Ground.tres')

mesh_instance.material_override = ground_material
mesh_instance.create_trimesh_collision()

$Island.add_child(mesh_instance)