Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#ActualTom KQT

Posted 20 March 2013 - 12:33 PM

So, I ended with a quadratic equation, so there are two solutions, but one of them quite doesn't make sense, but you'll see when you try it (it gives you a negative d so large that the line would be completely out of the circle).

 

The quadratic equation looks like this:

 

d^2 * sin(beta) + d * R - R^2 * sin(beta) = 0

where d is your unknown variable, beta is the angle and R is radius of the circle. You said a unit circle so R probably will be 1, but it was better to make it universal I think ;)

 

The better of the two solutions is:

D = R^2 + 4 * (sin(beta))^2 * R^2

d = (-R + sqrt(D)) / (2 * sin(beta))

Because of one algebraic operation I did in the process, there arose a condition that cos(beta) cannot be zero. Which makes sense, because that's true for beta = 90°.

 

 

If you're interested in the whole calculation, let me know and I'll post it somehow.


#1Tom KQT

Posted 20 March 2013 - 12:32 PM

So, I ended with a quadratic equation, so there are two solutions, but one of them quite doesn't make sense, but you'll see when you try it (it gives you a negative d so large that the line would be completely out of the circle).

 

The quadratic equation looks like this:

 

d^2 * sin(beta) + d * R - R^2 * sin(beta) = 0

where d is your unknown variable, beta is the angle and R is radius of the circle. You said a unit circle so R probably will be 1, but it was better to make it universal I think ;)

 

The better of the two solutions is:

D = R^2 + 4 * (sin(beta))^2 * R^2

d = (-R + sqrt(D)) / (2 * sin(beta))

Because of one algebraic operation I did in the process, there arose a condition that cos(beta) cannot be zero. Which makes sense, because that's true for beta = 90°.


PARTNERS