I have 3 Nulls in layout( imagine that those nulls define a triangle plane). Need to align rotation of another null to plane defined by furst 3 nuls.

Let say that p1 p2 and p3 are may 3 nulls, and p4 is null that i have to align,
any ideas how to calculate rotations?