My question is similar to How to Make a Point Orbit a Line, 3D but the answer there didn\'t seem to solve my problem. And what I am looking for is a general solution.
So, in working with @Timothy Shields in comments on How to Make a Point Orbit a Line, 3D I got my answer. Here is an excerpt from my resulting Circle class if anyone is interested. The normalized member on the Vector class simply divides each of the vector's components by the vector length to return a unit vector. Circle, Vector, and Point are all classes I have created for my app.
public class Circle {
public final Point center;
public final float radius;
public final Vector normal;
....
public Point pointAt(float angle) {
float xv = (float) Math.cos(angle);
float yv = (float) Math.sin(angle);
Vector v = findV();
Vector w = v.crossProduct(normal);
// Return center + r * (V * cos(a) + W * sin(a))
Vector r1 = v.scale(radius*xv);
Vector r2 = w.scale(radius*yv);
return new Point(center.x + r1.x + r2.x,
center.y + r1.y + r2.y,
center.z + r1.z + r2.z);
}
private Vector findV() {
Vector vp = new Vector(0f, 0f, 0f);
if (normal.x != 0 || normal.y != 0) {
vp = new Vector(0f, 0f, 1f);
} else if (normal.x != 0 || normal.z != 0) {
vp = new Vector(0f, 1f, 0f);
} else if (normal.y != 0 || normal.z != 0) {
vp = new Vector(1f, 0f, 0f);
} else {
return null; // will cause an exception later.
}
Vector cp = normal.crossProduct(vp);
return cp.normalized();
}
}