curve: adds pointFromX and tests