Well, I have created what may possibly be the first virtual trackball on Scratch. Drag mouse inside white circle. You can spin it by moving the mouse faster. Note: this is an old version that uses x and y which I decided to share.
There may be some glitches. This version uses X and Y. I did use sin in its simplest way. Something is missing, but I am not sure what. I know it is not perfect, but I have not yet seen a trackball on Scratch, so I made several.