Approach via python API for Blender. Runs on CPU, no support for GPU computing with python in Blender.
Approach via geonodes.