cosine (p: number, r: number, deg: number) {
    const theta: number = Math.PI / 180 * deg
    return p + r * Math.cos(theta)
  }