JS code to simulate light curves from a planetary transit across a star