Dear Daniel,
Thanks a lot for your help. I tried your scripting and finish the form on plan. However, supposed if I move some point up (Z axis), the tent structure will also go up by following some points (please see the attached photo).
Sorry for the bother because I just learn grasshopper.
Thanks