Virtual Trackball Rotation

I’m struggling to find a good and relatively easily understood example code for a virtual trackball rotation controller. Does anyone have any recommendations?

I’ve read a bit about quaternions. If they are involved in virtual trackball implementation, then hopefully I can learn about those through the example code as well.

Thanks in advance from a relative newbie to OpenGL!

Maybe this http://image.diku.dk/research/trackballs/index.html

Thanks! The link was very helpful.