Determine the Transformation from Cylindrical to Rectangular coordinates

In summary, you can't use arctan(y/x) to uniquely determine \phi; both (x,y) and (-x,-y) have the same value of y/x but have \phi values which differ by \pi. You must therefore also consider the signs of x and y.
  • #1
LagrangeEuler
717
20
In physics is usually defined that in cylindrical coordinates ##\varphi \in [0,2 \pi)##. In relation with Deckart coordinates it is usually written that
[tex]\varphi=\text{arctg}(\frac{y}{x})[/tex].
Problem is of course because arctg takes values from ##-\frac{\pi}{2}## to ##\frac{\pi}{2}##. What is the best way to solve this?
 

Attachments

  • Marej Spiegel cc.png
    Marej Spiegel cc.png
    24.4 KB · Views: 156
Last edited by a moderator:
Physics news on Phys.org
  • #2
To get those ##\phi## values you'd have to have ##x=0## so avoid that condition ie consider it a singular point.
 
  • #3
Why do I need to have ##x=0## to get those values of ##\varphi##? I do not understand? I cannot have those values of ##\varphi## with this definition. That is the problem.
 
  • #4
arctan is periodic with period ##\pi##. To get the correct quadrant, use the signs of x and y. y positive is first or second quadrant and x positive is first or fourth quadrant.
 
  • Like
Likes pasmith
  • #5
You can't use arctan(y/x) to uniquely determine [itex]\phi[/itex]; both (x,y) and (-x,-y) have the same value of [itex]y/x[/itex] but have [itex]\phi[/itex] values which differ by [itex]\pi[/itex]. You must therefore also consider the signs of [itex]x[/itex] and [itex]y[/itex]:
[tex]
\phi(x,y) = \begin{cases}
\arctan\left (\frac yx\right) & x > 0, y \geq 0 \\
\arctan\left (\frac yx\right) + \pi & x < 0 \\
\arctan\left (\frac yx\right) + 2\pi & x > 0, y < 0 \\
\frac{\pi}{2} & x = 0, y > 0 \\
\frac{3\pi}{2} & x = 0 , y < 0 \\
\mbox{undefined} & x = 0, y = 0
\end{cases}
[/tex]
 
  • Like
Likes Delta2
  • #6
I had the same problem when designing an inexpensive rotary encoder. Since the algorithm had to be implemented in hardware, I used the following algorithm set:[itex] \lvert x \rvert > \lvert y\rvert ? \varphi_{0}=\arctan\frac{\lvert y\rvert}{\lvert x\rvert} :\varphi_{0}=\frac{\pi}{2}-\arctan\frac{\lvert x\rvert}{\lvert y\rvert}[/itex] (sorry for the "C" terminology, but if-then-else looks silly in Tex). From there on it was just a matter of determining the quadrant based on the signs of x and y. And in our case x and y could not be 0 at the same time (but in another case I had to deal with such singularities - and decided not to update anything when passing through a singularity).
 

What is the formula for converting from cylindrical to rectangular coordinates?

The formula for converting from cylindrical to rectangular coordinates is:
x = r * cos(θ)
y = r * sin(θ)
z = z

How do I determine the values for r, θ, and z in cylindrical coordinates?

The value for r represents the distance from the origin to the point in the xy-plane, θ represents the angle from the positive x-axis to the projection of the point onto the xy-plane, and z represents the vertical distance from the xy-plane. These values can be determined by using the Pythagorean theorem and trigonometric functions.

Can any point in 3D space be represented in both cylindrical and rectangular coordinates?

Yes, any point in 3D space can be represented in both cylindrical and rectangular coordinates. However, the values for r, θ, and z may differ depending on the coordinate system used.

What are the advantages of using cylindrical coordinates over rectangular coordinates?

One advantage of using cylindrical coordinates is that they are well-suited for describing objects with cylindrical symmetry, such as cylinders or cones. Additionally, they can be easier to use in certain mathematical calculations, such as calculating the volume of a cylinder.

Can I convert from rectangular to cylindrical coordinates using the same formula?

No, the formula for converting from rectangular to cylindrical coordinates is different. It is:
r = √(x2 + y2)
θ = tan-1(y/x)
z = z

Similar threads

  • Calculus
Replies
2
Views
930
Replies
1
Views
934
  • Differential Equations
Replies
1
Views
407
  • Calculus and Beyond Homework Help
Replies
4
Views
896
Replies
3
Views
2K
Replies
3
Views
507
Replies
18
Views
18K
Back
Top