Rather than giving you code, I will explain the concept. Writing code is more than just copying code and pasting it into your project. Understanding the concepts and writing the process of what you are attempting to accomplish helps immeasurably. (This is called a specification) You can then write the code to fit the design.
Refer to the grid below starting at point 1. The mouse will move through the remaining numbers on the grid in a clockwise direction. You should have a basic understanding of trigonometry to help identify when you are drawing a circle.
--------->-----1------>--------
| | | | | | |
| | | | | | |
-----8---------|---------2-----
| | Q4 | | | Q1 | |
^ | | | | | V
---------------|---------------
| | | | | | |
| | | | | | |
7______________|______________3
| | | | | | |
| | | | | | |
---------------|---------------
^ | Q3 | | | Q2 | V
| | | | | | |
-----6---------|---------4-----
| | | | | | |
| | | | | | |
---------<-----5-----<---------
Which direction are we going?
Below is a state table for determing clockwise direction, take the differences of the current mouse x and y values and the previous x and y values. The Q1 difference should result in a positive X value and a negative Y value, and so on. Keep a history of the direction to know if the mouse continues to move in a clokwise direction.
Quadrant CW Dir Rslt
-----------------------
Q1 +X -Y
Q2 -X -Y
Q3 -X +Y
Q4 +X +Y
How fast are we going?
For calculating the speed for every change in mouse coordinates(X,Y) record the time since the last coordinate change. Hint: use the timer counter as a stop watch. A slow circle will take longer...
I will leave it to you to use google to find out how to get the mouse coordinates (mousemove event) and set up and read a timer to measure the time between events.
Good Luck!