
On the other hand, the polar coordinate system does not include any perpendicular lines. Coordinates of any arbitrary point in space are the distances between this point and the two lines, denoted by the x-axis and the y-axis. Then, the point where they meet is called the origin of the coordinate system.


The Cartesian coordinate system is created by drawing two perpendicular lines. It means that we only have two dimensions: height and width (no depth), just as on a piece of paper. For now, we will limit ourselves to a 2D space. Let $r=3$ and $\theta=\pi/8$.As you probably know, we use coordinates to describe the position of a point in space uniquely. This gives a value in inches, in millimeters this is about a $.02mm$ thickness per sheet: b * 25.4 Imagine we have $a < b$ and a partition $a=t_0 < t_1 < \cdots < t_n = b$. For example, here we see that the area over a given angle is well approximated by the wedge for each of the sectors:Īs well, see this part of a Wikipedia page for a figure. The area can be approximated by wedges (not rectangles). In practice, this is not usually the best solution. In some cases it might be possible to translate back into Cartesian coordinates and compute from there. R = 4 r ( t ) = R function plot_general_circle! ( r0, gamma, R ) # law of cosines has if gamma=0, |theta| <= asin(R/r0) # R^2 = a^2 + r^2 - 2a*r*cos(theta) solve for a r ( t ) = r0 * cos ( t - gamma ) + sqrt ( R ^ 2 - r0 ^ 2 * sin ( t - gamma ) ^ 2 ) l ( t ) = r0 * cos ( t - gamma ) - sqrt ( R ^ 2 - r0 ^ 2 * sin ( t - gamma ) ^ 2 ) if R < r0 theta = asin ( R / r0 ) - 1e-6 # avoid round off issues plot_polar! ( r, gamma - theta, gamma + theta ) plot_polar! ( l, gamma - theta, gamma + theta ) else plot_polar! ( r, 0, 2 pi ) end end plot_polar ( r, 0, 2 pi, aspect_ratio =: equal, legend = false ) plot_general_circle! ( 2, 0, 2 ) plot_general_circle! ( 3, 0, 1 ) We have to be a bit careful for the general circle, as when center is farther away from the origin that the radius ( $R$), then not all angles will be acceptable and there are two functions needed to describe the radius, as this comes from a quadratic equation and both the "plus" and "minus" terms are used. Using plot_polar, we can plot circles with the following. We will use this in the following, as the graphs are a bit more familiar and the calling pattern similar to how we have plotted functions.Īs Plots will make a parametric plot when called as plot(function, function, a,b), the above function creates two such functions using the relationship $x=r\cos(\theta)$ and $y=r\sin(\theta)$. ) = plot ( t -> r ( t ) * cos ( t ), t -> r ( t ) * sin ( t ), a, b kwargs. It is essentially this: plot_polar ( r, a, b kwargs. To avoid having to create values for $\theta$ and values for $r$, the CalculusWithJulia package provides a helper function, plot_polar. ( ts ) plot ( ts, rs, proj =: polar, legend = false ) For example, to plot a circe with $r_0=1/2$ and $\gamma=\pi/6$ we would have: using Plots R, r0, gamma = 1, 1 / 2, pi / 6 r ( theta ) = r0 * cos ( theta - gamma ) + sqrt ( R ^ 2 - r0 ^ 2 * sin ( theta - gamma ) ^ 2 ) ts = range ( 0, 2 pi, length = 100 ) rs = r. The Plots.jl package provides a means to visualize polar plots through plot(thetas, rs, proj=:polar). Except for the origin, there is only one pair when we restrict to $r > 0$ and $0 \leq \theta R$ will not be defined for all values of $\theta$, only when $|\sin(\theta-\gamma)| \leq R/r_0$. To recover the Cartesian coordinates from the pair $(r,\theta)$, we have these formulas from right triangle geometry:Įach point $(x,y)$ corresponds to several possible values of $(r,\theta)$, as any integer multiple of $2\pi$ added to $\theta$ will describe the same point. Polar coordinates parameterize the plane though an angle $\theta$ made from the positive ray of the $x$ axis and a radius $r$. We begin by loading our package providing access to the necessary packages: Definition of polar coordinates Instead of talking about over and up from an origin, we focus on a direction and a distance from the origin.

The description of the $x$- $y$ plane via Cartesian coordinates is not the only possible way, though one that is most familiar.
