How to elicit a ray and tangent to the ROI region (use a python script if possible)

Operating system:windows 64 bit
Slicer version:5.7.0
Expected behavior:
Actual behavior:

Could you please provide a bit more details and perhaps a picture illustrating what you would like to achieve?


Maybe like this,but please note that the point might not be on the same plane as this graph,and the graph may even be a 3D graph.How can I achieve it?