Simple circles

1. Jul 25, 2006

kevdoig

I have a point a 3D space (say 0,0,0), a radius of the circle(say 2m), and know a single point that lies on the circle at a certain x co-ordinate, and have the corresponding y coordinate for the point on the circle. How can I calculate the Z co-ordinate for this point given the above parameters?

I am trying to generate a 3D pipe and have the centre of the pipe at (0,0,0), and know the the x distance along the pipe and the height of the pipe at any given point, but not its depth (which i need to calculate), if this helps explain.

2. Jul 25, 2006

benorin

Assuming that the point you named in 3D space (0,0,0) is the center of the circle of radius 2m, and that you know that $$( x_0 ,y_0,z)$$ is a point on the circle and z (the Z coordinate) is unknown: then to determine z know the the distance between the center of the circle (0,0,0) and any point on it, say $$( x_0 ,y_0,z)$$ , is equal to the radius 2m, hence

$$\sqrt{x_0^2+y_0^2+z^2}=2m$$

which gives

$$z=\sqrt{(2m)^2-x_0^2-y_0^2}$$

for the Z coordinate.

3. Jul 25, 2006

kevdoig

cheers, solved it 5 mins after posting, using a similar method, think long nights with early mornings make me a little slow!