onnect a line between every two consecutive points (xi, yi) and (xi+1, yi+1), where 0 <= i <= n.
xi = s * ((a + b) * cos (i * PI) - b * cos ((a + b) / b * i * PI))
yi = s * ((a + b) * sin (i * PI) - b * sin ((a + b) / b * i * PI))
Verify with s = 10, a = 19, b = 5, n = 1000 to get this displayed result.
Note that the sin and cos trigonometry functions accept a radiant value not angle. For example, 30 degree should be replaced with PI/180*30 instead. Moreover, the divisions inside the functions need to be kept in double not int precision in order to render a correct result.