The bulk of that rolly-ball explanation compresses down quite small with optimisations made from knowing it is a sphere, the nature of the pattern, etc. This is the code which does it:
I've added square brackets [x] to indicate the elements I described above
Code:
isisVecX = 0:isisVecY = 0:isisVecZ = 1 ' [1]
Code:
q = isisXv * dt * 64 / 24 ' [2]
isisVecX1 = isisVecX * Cos(q) + isisVecZ * Sin(q) ' [3]
isisVecZ1 = -isisVecX * Sin(q) + isisVecZ * Cos(q)
isisVecX = isisVecX1: isisVecZ = isisVecZ1
q = isisYv * dt * 64 / 24 ' [2]
isisVecY1 = isisVecY * Cos(q) + isisVecZ * Sin(q) ' [3]
isisVecZ1 = -isisVecY * Sin(q) + isisVecZ * Cos(q)
isisVecY = isisVecY1: isisVecZ = isisVecZ1
'[4]
For X = 0 To 47
xa = (X - 23.5): xa2 = 600.25 - xa ^ 2: yc = Sqr(xa2) ' [5]
For ya = -yc To yc
z2 = xa2 - ya ^ 2 + 0.1
z = Sqr(z2) ' [6]
e = (isisVecX * xa + isisVecY * ya + isisVecZ * z) ' [7]
c = 0
If e > 22.56 Then c = 48 ' [8]
If e > 8.8125 And e < 14.6875 Then c = 48
If e > -2.9375 And e < 2.9375 Then c = 48
If e > -14.6875 And e < -8.8125 Then c = 48
If e < -22.56 Then c = 48
Y = ya + 23.5
suc& = BitBlt(Picture3.hdc, X + 96, Y, 1, 1, Picture3.hdc, X + c, Y, &HCC0020) ' [9]
Next: Next
