Skip to content

Instantly share code, notes, and snippets.

@pmalin
Created November 16, 2020 23:51
Show Gist options
  • Save pmalin/a923ad646dc35de06e43cf8eb094620c to your computer and use it in GitHub Desktop.
Save pmalin/a923ad646dc35de06e43cf8eb094620c to your computer and use it in GitHub Desktop.
BBC Micro Bot - Shaded Sphere
1MO.1:V.5:F.U=0TO319:F.V=0TO255:x=U/128-1:y=V/128-1.4:z=1/SQR(x*x+y*y+1):x=x*z:y=y*z:X=0:Y=.4:Z=-2:a=0:b=y*2:c=0:S=9:P=-Y*y-Z*z:i=x*P:j=Y+y*P:k=Z+z*P:C=i*i+j*j+k*k
2IFC<1w=P-SQR(1-C):X=w*x:Y=Y+w*y:Z=Z+w*z:a=X:b=Y:c=Z EL.IFy<0t=(Y+1)/-y:X=X+x*t:Y=Y+y*t:Z=Z+z*t:b=1:S=Z-.6:S=X*X+S*S
3Y=Y+2:Z=Z-2:I=(X*a+Y*b+Z*c)*4/SQR(X*X+Y*Y+Z*Z)-?-412/192:GC.0,I*(S>1.5)*(I>0):PL.69,U*4,V*4:N.,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment