Dim Rs As Integer, R0 As Integer, La As Integer, Lb As Integer, Lc As Double, Rb As Double, Z As Double
Rs = 9: R0 = 16: La = 22: Lb = 38: Lc = 38.992: Rb = 16.5: Z = -0.781
Const Pi = 3.1415926
Const Hmax = 8.78 / (13.5 ^ 2 / 2 / 8.5 ^ 2)

Dim W0 As Double, B0 As Double, Bd As Double, Wd As Double, Rd As Double, Kd As Double, Ymax As Double
W0 = Pi / 2 - Atn(((La ^ 2 + Lc ^ 2 - (R0 + Rs) ^ 2) / (2 * La * Lc)) / Sqr(1 - ((La ^ 2 + Lc ^ 2 - (R0 + Rs) ^ 2) / (2 * La * Lc)) ^ 2))
B0 = Atn(((Rb + Z) / Lb) / Sqr(1 - ((Rb + Z) / Lb) ^ 2))
Bd = Atn(((Rb + Z - Hmax) / Lb) / Sqr(1 - ((Rb + Z - Hmax) / Lb) ^ 2))
Wd = W0 + (B0 - Bd)
Rd = Sqr(La ^ 2 + Lc ^ 2 - 2 * La * Lc * Cos(Wd))
Kd = Pi / 2 - Atn(((Rd ^ 2 + Lc ^ 2 - La ^ 2) / (2 * Rd * Lc)) / Sqr(1 - ((Rd ^ 2 + Lc ^ 2 - La ^ 2) / (2 * Rd * Lc)) ^ 2))
Ymax = Rd - Rs - R0

Print
Print
Print
Print

Dim aj As Double, H As Double, B As Double, W As Double, R As Double, K As Double, Y As Double, a As Double
For aj = 0 To 63 Step 0.01
  H = (8.78 - 16.70715 * (aj / 63) ^ 2 + 156.52401 * (aj / 63) ^ 8 - 328.58989 * (aj / 63) ^ 9 + 241.39207 * (aj / 63) ^ 10 - 61.39904 * (aj / 63) ^ 11) / (13.5 ^ 2 / 2 / 8.5 ^ 2)
  B = Atn(((Rb + Z - H) / Lb) / Sqr(1 - ((Rb + Z - H) / Lb) ^ 2))
  W = W0 + B0 - B
  R = Sqr(La ^ 2 + Lc ^ 2 - 2 * La * Lc * Cos(W))
  K = Pi / 2 - Atn(((R ^ 2 + Lc ^ 2 - La ^ 2) / (2 * R * Lc)) / Sqr(1 - ((R ^ 2 + Lc ^ 2 - La ^ 2) / (2 * R * Lc)) ^ 2))
  Y = R - Rs - R0
  a = aj + (K - Kd) * 180 / Pi
BackColor = vbWhite
FontSize = 12
CurrentX = 5500
Print "aj="; aj, "a="; a, "Y="; Y
Next aj