How to solve This Problem !

1. Nov 27, 2003

OSProject

hi every one .. as you can see below on the image on the attachments ,, this is my project paper ... i have already solve 80 % percent of the project ,, but there is one problem that i cant find solution for it ... maybe it is the easiest part ,, but my knowldge on math and movment equations is too bad :)

any way ,, my problem is how can i know the new direction for the particle when it is reach the boundary ( border of the circle ) the direction is represented as angle ,, so how can i know the new angle ( direction ) for a specific particle that is reflected because it is reaching the boundary !!!

sorry my english is not good , but i hope you can at least understand what i mean :)

thanks alot

Attached Files:

• circle.zip
File size:
46 KB
Views:
57
2. Nov 28, 2003

Tom Mattson

Staff Emeritus
The answer is going to depend on what you have so far. Do you have a way to calculate the components of the velocity vector of the particle after the collision?

If so, then the angle you seek can be found from:

&theta;=arctan(vy/vx)

You have to be careful about this, because it gives 2 solutions in the range [0o,360o). But we can talk about how to sort that out once you have answered my question.

edit: fixed quote bracket

3. Nov 28, 2003

OSProject

hello Tom ,,

really i have no way to calculate that thing !!

i have the following information :

1- Direction of the movment ( represented as angle )

2- The Radius of the circle

3- the X and Y for each particle

4- the speed of particle ( represented as Integer Numbers ,, to multiply the original movment step by the speed )

and when collision occur ,, i can know the X & Y for the particle at that moment

Thanks :)

4. Nov 28, 2003

gnome

I haven't worked this out completely, but I will be working on a similar project next semester so I've been giving it some thought. Maybe these ideas will be helpful to you.

I think this is best done with vectors.
1. Express the movement of the particle as a vector. This is your "Incident" vector.
2. Express the boundary as the equation of a circle.
3. Find the point of impact with the boundary.
4. Find a Normal vector to the circle at the point of impact. (Simply, the negative of the gradient vector at that point, if you know how to do that.)
5. Finally, find the "Reflected" vector, which I think is a vector whose angle with the Normal is the negative of the angle between the Incident vector and the Normal. (I'm not sure that this last part is exactly correct. But I'm sure that one of the good math guys here can come up with an easy formula for you to use at this stage.)

5. Nov 29, 2003

OSProject

hello gnome

thanks for these concepts , i am already follow some of these ideas ,, but about the last one i dont think that the angle of the reflected particle will be the negative of the original angle ! i am try this idea and i have wrong answers :)

thanks

6. Nov 29, 2003

gnome

Well, maybe that was an oversimplification. (Or maybe it was just wrong. I'm not so good with vectors yet.)

Let's try this. Say you have your movement vector V directed towards the perimeter and the normal vector N directed towards the center of the circle.

First find vector P = projN-V , the vector projection of the negative of V onto N

Now find a vector X = -V - P. If I've done this correctly, this X is orthogonal to the Normal and terminates at the tail of the original movement vector V.

I think the "reflection" vector R you're looking for is
R = -2X - V.

Please let me know if that works.