How to write STL from x y z co-ordinates ?

How to write STL from x y z co-ordinates? x y z are extracted from 3D volume images, so my goal is x y z convert to STL?

STL is a surface geometry format, so you will need to extract a surface from the 3D volume images first.

Relevant examples:

Extracting an isocontour from a structured points (it will work with a 3D image volume as well)

Saving an STL

Thank you sir, i will check and update you.

Sir i have generated Triangulation from X Y Z , but i cont generate 3D STL shape? can you share sample code?