# Rotating circles in 3D

1. Jul 27, 2008

### otis

I am creating a program where I want to rotate circles facing me(point sprites for those familiar with CG) so they look like spheres. Data I have:
- coordinates of every point inside point sprite in [-1,1] € R^2 space.
- center of point sprite in 3D space
- point sprite normal in 3D space

Best thing for me would be if I could find an equation that would test for each pair of (i,j) coordinates if they lie within a circle, rotated to a proper 3D plane determined by normal vector and center of point sprite. Is that possible? PLease bear in mind that I am not really good at this.

sorry for my bad english, but I hope you understood what I meant.

2. Jul 28, 2008

### pkleinod

Hello Otis and welcome to PF. It is not clear to me exactly what you want to do. At first sight, it would seem to me that any point within the original circle would still be inside the rotated circle. Obviously, I have not understood what you want. However, if CG means
computer graphics, then the following cite ought to point you in the direction of a solution.

http://www.geometricalgebra.net/

Much of computer graphics relies heavily on geometric algebra, particularly on the conformal model of Euclidean 3D space, which is the tool of choice for manipulating lines, circles, spheres, etc. The cite above provides you with free demonstration software (GAView) to illustrate the application of GA to CG. The book (Geometric Algebra for Computer Science) advertised on the cite provides a thorough and clear exposition of this topic together with many examples and material explaining how to do the programming.

3. Jul 28, 2008

### otis

Thanks. I know I described my problem in very unclear way, but that is the best I can do, sorry. So here is a little picture that illustrates it:

http://img369.imageshack.us/my.php?image=sampleig2.png

As you see I am actually working on a 2D projection plane where the image is drawn. Lower left coordinates of a square are (-1,-1) and upper right are (1,1). I also have center of this square in bot 2D projected coordinates and 3D space coordinates, as well as normal vector of a square(that should be rotated like the circles in the bottom image). Now I want to go through every (i,j) pair and check if it falls inside that rotated circle from the lower picture.