PV-loop area

I am developing a 0D model for the cardiac circulation and I would like to compute the workload as the internal area of the Pressure Volume -loop. Do you know any method that allow me to do this even if my PV loop is extracted and defined just by the points (ventricular volume, ventricular pressure ) ?

This is a julia programming forum, the general julia programmer will probably not know what PV, VLV or PLV refers to. You may want to introduce your problem a bit better for the audience expected to read it here.