Since you are talking about circles, I am assuming you are making a 2D application.
In OpenGL, you have the following coordinates:
Y
|
|
|
O---- X
/
/
Z
This means that your 2D application is in X-Y space, with Z being perpendecular to the monitor (and towards the outside).
So, if you have a circle going around the other, you probably meant to first translate the circle in the X-Y plane (for example on the Y axis), and then apply a rotation on the Z axis.
So your matrix multiplication should be:
(cos(angle) sin(angle) 0 0 ) ( 1 0 0 0 ) ( circle_center_x )
(-sin(angle) cos(angle) 0 0 ) ( 0 1 0 yTran ) ( circle_center_y )
( 0 0 1 0 ) ( 0 0 1 0 ) ( 0 )
( 0 0 0 1 ) ( 0 0 0 1 ) ( 1 )
Or just in 2D:
(cos(angle) sin(angle) 0 ) ( 1 0 0 ) ( circle_center_x )
(-sin(angle) cos(angle) 0 ) ( 0 1 yTran ) ( circle_center_y )
( 0 0 1 ) ( 0 0 1 ) ( 1 )
Using OpenGL functions:
glRotatef(angle, 0, 0, 1);
glTranslatef(0, yTran, 0);
glBegin(GL_LINE_LOOP);
for (...)
/* points of circle around circle_center_x/y */
glEnd();
Note that in OpenGL, the matrices are multiplied on the right. So if you write glRotatef before glTranslatef, the rotation will be applied after the translation.