Reflecting a circle off another circle

  • Thread starter jrs8719
  • Start date
  • Tags
    Circle
In summary: So you would solve for x1 and y1 using the quadratic equation:x1=\frac{x_0(a^2-b^2)+2aby_0}{a^2+b^2}y1=\frac{y_0(a^2-b^2)+2aby_0}{a^2+b^2}
  • #1
jrs8719
1
0

Homework Statement



I am working on a computer game and I need to correctly reflect a ball off a circle object. I am trying to do it as a line and circle intersection. I know the intersect point of the line (ball path) and the circle. Now I want to rotate the ending point of the ball path about the intersection point to get the correct angle of reflection. The following are known:

ball current x
ball current y
ball end x
ball end y
ball radius

circle center x
circle center y
circle radius

intersection point of ball path and circle x and y

Homework Equations



I don't know.

The Attempt at a Solution



I know I need to find the angle of incidence between the tangent line and the incoming ball path which will also equal my angle of reflection. I think once I know those two angles I can subtract them from 180 to get my rotation angle then rotate my end point about the angle of intersection by that amount. I just don't know how.

I have attached a pic. Again, I know the two end points of my line segment, the point of intersection and the radius of the circle.

I am ultimately trying to get the point marked by the open circle, so I need to know the angle between the ball path and the norm, which is the blue line.

Thanks.
 

Attachments

  • Untitled.jpg
    Untitled.jpg
    2.8 KB · Views: 420
Physics news on Phys.org
  • #2
Call the starting position of the ball (x0,y0), the bounce point on the circle (a,b), and the end point (x1,y1). The vector from the (a,b) to (x0,y0) is

[tex]\vec V = \langle x_0 - a, y_0 - b\rangle[/tex]

The position vector of (a,b) is

[tex]\vec R = \langle a,b\rangle[/tex]

and a vector of length one in that direction is

[tex]\hat r = \frac{\vec R}{| \vec R|}[/tex]

The orthogonal projection of V on the radius direction is

[tex]\vec V_{perp} = \vec V - (\vec V \cdot \hat r)\hat r[/tex]

Then the ending point is:

[tex]\langle x_1,y_1\rangle = \vec R + \vec V - 2\vec V_{perp}[/tex]
 
  • #3
Since this apparently isn't homework, I will save you a little more work. Here's the coordinates (x1,y1) of the reflection point in terms of the given point and the bounce point on the circle:

[tex]x_1=\frac{x_0(a^2-b^2)+2aby_0}{a^2+b^2}[/tex]

[tex]x_2=\frac{y_0(b^2-a^2)+2abx_0}{a^2+b^2}[/tex]
 

FAQ: Reflecting a circle off another circle

1. How do you reflect a circle off another circle?

To reflect a circle off another circle, you need to first identify the center point of the original circle. Then, draw a line from the center point to the center point of the second circle. This line will act as the axis of reflection. Next, mark a point on the original circle and draw a line from that point to the axis of reflection. This line will create a 90-degree angle with the axis. Finally, extend this line to the other side of the axis to create the reflected circle.

2. What is the purpose of reflecting a circle off another circle?

The purpose of reflecting a circle off another circle is to create a mirrored image of the original circle. This can be useful in many applications, such as creating symmetrical designs or patterns.

3. Can any circle be reflected off another circle?

Yes, any circle can be reflected off another circle as long as the two circles intersect at some point. The size and position of the two circles will determine the location and size of the reflected circle.

4. How does the distance between the two circles affect the reflection?

The distance between the two circles will affect the size and position of the reflected circle. The closer the circles are to each other, the smaller the reflected circle will be. Conversely, the further apart the circles are, the larger the reflected circle will be.

5. Are there any other methods for reflecting a circle off another circle?

Yes, there are other methods for reflecting a circle off another circle, such as using a compass or using a geometric construction method. However, the method described in the first question is the most common and efficient method for reflecting a circle off another circle.

Back
Top