Draw a specified plane and Angle Planes measure

I want to implement in 3D slicer software, given three points to determine a plane, may I ask how this function is implemented? I also want to determine any plane given any point and find the dihedral Angle. I hope you can help me solve such problems. Thank you very much.
For example, I want to identify a plane at mark F_1,F_2,F_3 in the figure below,the dihedral Angle between the plane and the midsagittal plane is found. The landmarks in the figure below are all specified.

Operating system:
Slicer version:5.4.0
Expected behavior:
Actual behavior:

To place a plane by 3 points, you can go to Markups module, add a new plane, and in Plane settings section choose TypeThree points.

You can get the angle between two planes using this code snippet in the script repository.