What is the function corresponding to the upper left quarter of a circle ? Where $x$ goes from 0 to $x_\text{max}$, and $y=f(x)$ goes from $y_\text{min}$ to $y_\text{max}$.
Function for the upper left part of a circle
-
1What is your ultimate goal here? Is this a homework problem? – 2012-03-13
1 Answers
Maybe you are thinking of shifting the upper half-circle $y=\sqrt{r^2-x^2}$ to an arbitrary center $(x_0,y_0)$ to get $y=y_0+\sqrt{r^2-(x-x_0)^2}$? To get the upper left corner of that, restrict $x$ to $[x_0-r,x_0]$. If the lower bound on $x$ is $0$, then $x_0=r$, which implies that $y_max-r=y_min=y_0$. Is that what you are looking for?
If, on the other hand, you want an ellipse (with axes parallel to the $x$ and $y$ axes), then the radius $r$ needs to be replaced by two lengths, the distance from center in the $x$ and $y$ directions. These distances are usually denoted $a$ and $b$, and called the semi-major (for the larger) and semi-minor (for the smaller length) axes. So from the equation $ \left(\frac{x-x_0}{a}\right)^2 + \left(\frac{y-y_0}{b}\right)^2 = 1 $ to get a function, you need to solve for $y$. When you take the square root, you need to introduce a $\pm$ sign, but for the upper half, you choose the positive square root. If you see how the above equation corresponds to the schematic diagram of the ellipse, and if you are given corner/edge and/or central points, then you can quickly solve your problem for the constants $a,b,x_0$ and $y_0$. The above ellipse lies in the rectangle where $x\in[x_0-a,x_0+a]$ and $y\in[y_0-b,y_0+b]$. Thus we have the correspondence $ \matrix{ x_\text{min} = x_0-a &\qquad& y_\text{min} = y_0-b \\ x_\text{max} = x_0+a &\qquad& y_\text{max} = y_0+a } $ for the "edges" or horizontal & vertical extreme points/tangents of the ellipse, and the functional form $ y = y_0 \pm b\sqrt{a^2-(x-x_0)^2} $ for the top (choosing the $+$ from $\pm$) and bottom (choosing the $-$ from $\pm$) halves of the ellipse. If you are given the minimum and maximum $x$ and $y$ values, you can use the above equations to find the center $(x_0,y_0)$ and the "radii" $a$ & $b$. Do you see how to do that? A hint is that the $x$ coordinate of the center, $x_0$, is the average value of $x$ on the ellipse, or, algebraically, that you should try adding the equations above in each column separately.
Is this what you need? What are you ultimately trying to accomplish? Do you need the functional form (or would perhaps a parametric form better suit your goals)?
-
0If you type this equation on google: 100+sqrt((1000-100)^2-(x-(1000-100))^2) You will see that y is between 100 and 1000 (this is what I want, Y is always between 100 and 1000), and y is between 0 and 1800 according to the curve, but I want y to be between 0 and eg 7000 (not 1800). How can I modify this function according to this even if it will not be a part of a circle but a part of an ellipse. Here I want y_low = 100, y_up = 1000, x_low = 0, x_up = 7000 – 2012-03-13