# How to compute a transformation matrix that describes each position and rotation on a sphere?

I am having an issue constructing my transformation matrices, for this sphere problem.

I know the 3d coordinate of the center, and the radius of, the sphere.

Since I know the radius and center of the sphere, it's easy to compute all positions on the sphere, but I'm not sure how I should compute the rotation matrix?

Each point has to be rotated such that it points toward the object, and the only thing that tells me the orientation of the vector is the difference between the 3d point on sphere and the 3d point of the object.. But one vector doesn't seem enough to construct a whole rotation matrix?...

Could I extract a rotation matrix, that "tells" the point how it should be rotated to look at the object?

It is quite common to use an “up” vector in addition to the view vector that you computed. Most 3D libraries have some kind of “lookat” function: Transform.LookAt in Unity3D, glm::lookAt in glm, or the deprecated gluLookAt in ancient OpenGL.
Note that if the “up” vector is constant or only depends on the position, you will have discontinuities in the resulting transformation. This is mathematically unavoidable. One possibility is to use e.g. (0,0,1) as a constant “up” vector, and just disallow the viewer from being exactly in (0,0,1) or (0,0,-1).