### Elliptic Curve divisor from polynomial and vice versa

I want to construct the Picard group of an elliptic or hyperelliptic curve. I can see how to construct a divisor from points, but there's nothing about calculating them from functions.

Looking at other docs, I see how to intersect curves and calculate their intersection multiplicity. Do I have to do this manually?

Also what about getting the function the defines a divisor?

Thanks