Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Circles, mathematically

Name: Anonymous 2008-12-21 2:57

My math knowledge is limited, and I would appreciate some help.

How do I find the (x,y) coordinates of a point on a circle's perimeter based on the direction of a ray coming from the circle's origin?

Basically:

Input: Circle's origin coordinates, circle's radius, degree
Output: Coordinates of point where ray (coming from origin of circle) moving in the direction of [degree] hits the perimeter of the circle.

Preferably the degree input is the system of 0-359 degrees, where a number above or below that range would also work just as well, effectively 'wrapping around,' and making 360 work effectively as 0.

Sorry if my diction is poor, I am really not mathematically skilled at all, theory is more my game...

Name: Anonymous 2008-12-21 3:12

if (x,y) = (a,b)

x = a + radius*cos(angle)
y = b + radius*sin(angle)

Name: Anonymous 2008-12-21 3:15

sry, I meant if "center coordinates" = (a,b)

x = ...

Name: Anonymous 2008-12-21 3:22

>>2
Much thanks. Is there any simpler way of doing this, without sine or cosine? I'm looking for a method that is easily done in the head. It's not necessary, but it would be helpful.

Name: Anonymous 2008-12-21 3:22

>>4
Forgot to say that preciseness is not at all necessary, as I will most likely be dropping decimals.

Name: Anonymous 2008-12-21 3:25

I don't think there's a simpler way... at least I can't think of one

Name: Anonymous 2008-12-21 3:35

>>6
I see, thank you anyway.

Name: Anonymous 2008-12-21 20:29

>>2
This won't let me find the point anywhere on the circle, only points with a positive X value. Help...

Name: Anonymous 2008-12-22 8:34

>>8
No, shut up.

Name: Anonymous 2008-12-22 19:36

>>4

As long as you have relatively small Radian values for your angle -degrees won't work- you can use a two-to-three term Taylor Series Expansion Approximation for sin(angle) and cos(angle).

Recalling the coordinates mentioned earlier:

x ~= a + radius * (1 - Φ²/2 + (Φ^4)/24)
y ~= b + radius * (Φ - Φ³/6 + (Φ^5)/120)

where Φ is some small radian angle.

Now, dividing the fifth power of a fraction by 120 may not be the easiest mental math to do, its about all you can do save for memorizing a trig table.

Name: Anonymous 2008-12-22 23:11

I'll give you an idea of what I'm looking for:

a (circle origin) + radius + (increment/360) = x

b (circle origin) + radius + (increment/360) = y

When [increment] is increased by one, the (x,y) coordinates move along the perimeter of the circle, and when they are decreased by one they move in the opposite direction. 360 is just a placeholder, I'd probably use a smaller number in practice. + is also just a placeholder for whatever is necessary for the equation.

Name: Anonymous 2008-12-23 17:12

>>11
For a formula like that to work, the boundary of the circle would have to be a straight line, or very close to it.  If the angles you're working with are really, really small, you can get something like that out of >>10 which would be reasonably accurate, but other than that, no chance.

If you're looking for something you can do in your head, there's no formula simpler than >>10 that's going to give you anything more accurate than if you just ballparked it visually by looking at a picture.

Name: Anonymous 2008-12-24 18:46

>>12
I refuse to believe that never in the history of mathematics/geometry has anyone ever created a formula like the one I'm looking for.

Name: 4tran 2008-12-25 0:57

>>13
Maybe what you want doesn't exist?

Name: Anonymous 2008-12-25 5:11

>>14
What I'm saying is that I refuse to believe that such a simple thing wouldn't exist by now, considering how long we've been theorizing about the circle.

Name: Anonymous 2008-12-25 17:23

>>15

The type of expression you want are the equations of a straight line.  Unless I missed that day, mathematicians still haven't figured out a way to graph a circle with a linear equation, so I guess you'll just have to wait another 5000 years.  Sorry.

Name: Anonymous 2008-12-25 17:31

>>15
Read up on it, it's not a startling fact.

What you appear to want is some sort of linear approximation to the sin function.
We've offered you polynomial approximations of small degree, but any smaller degree and you lose any sense of accuracy in the approximation.

Even with a very simple understanding of the sin function you can see such a approximation is impossible, merely by the nature of the function.

It's not that we haven't thought about it long enough, it's that it doesn't exist.

It's liking asking for a polynomial with integer co-efficients that e or pi satisfy.
Surely you might say considering how long we've been studying these numbers we should have such a simple thing, but we can prove they don't exist.

Similarly I could prove to you that no linear approximation exists, but I doubt you follow even the elementary maths involved in that.

GTFO my /sci/

Name: Anonymous 2008-12-26 21:44

>>17
Ahhh, go fuck yourself, kid. I already know what to do, I just can't figure out how to solve the problem of zero division, so I thought someone else might've figured it out in the past few millennia (why the hell does Firefox say that's spelled wrong?)

Name: Anonymous 2008-12-30 12:27

>>18
division by zero (not really)

http://en.wikipedia.org/wiki/Wheel_theory

Don't change these.
Name: Email:
Entire Thread Thread List