How to create a new surface from either 3 or 4 corner points.

Hi everybody, how to create a new surface from either 3 or 4 corner points in MAXScript.
Thank you.