NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
November 19, 2017, 10:12:33 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
"Progress, therfore, is not and accident,¡K" ..."Herbert Spencer(1820-1903, British philosopher)"
Google Bookmarks Yahoo My Web MSN Live Netscape Del.icio.us FURL Stumble Upon Delirious Ask FaceBook

Pages: 1 2 [3]   Go Down
  Print  
Author Topic: Collision 2D  (Read 135763 times)
0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
Bluzkin
Newbie
*
Offline Offline

Posts: 3

«
Embed this message
Reply #60 on: November 19, 2010, 02:08:33 am » posted from:Amsterdam,Noord-Holland,Netherlands

Hello Fu-Kwun Hwang. This really helped me. For my finals I chose to make a physics simulation application (in Game Maker 8.0) including brownian motion.

I have tried to get the final formula for v1' with the first two equations but I just can't get it right. Could you maybe send me the the steps you took to get there? That would be great.

I also don't know how to calculate the component of a force (or other vector) in a certain direction so if you could help me with that I would really appreciate it.

Thanks in advance.

(I don't know if I double posted but I think my first post wasn't processed or something...)
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #61 on: November 19, 2010, 11:53:24 am » posted from:,,Taiwan

I assume you know how to find vector which connect between center of two particles.
if one is (x1,y1,z1),another one is (x2,y2,z1). then the vector \vec{r} is (x2-x1,y2-y1,z2-z1).
Assume velocity of particle 1 isvec{v}= (vx1,vy1,vz1),
The velocity component in the vector vec{r} direction can be calculated as \vec{v_p}=(\vec{v}\cdot\vec{r})/r^2 \vec{r},where r is the length of velocity \vec{r}=\sqrt{(x2-x1)^2+(y2-y1)^2+(z2-z1)^2}
 
i.e.
 vx1'=((vx1*(x2-x1)+vy1*(y2-y1)+vz1*(z2-z1))/r^2) (x2-x1)
 vy1'=((vx1*(x2-x1)+vy1*(y2-y1)+vz1*(z2-z1))/r^2) (y2-y1)
 vz1'=((vx1*(x2-x1)+vy1*(y2-y1)+vz1*(z2-z1))/r^2) (z2-z1)
 
And the velocity compendicular to vec{r} is \vec{v_n}=\vec{v}-\vec{v_p}

P.S. The inner product between \vec{A} and unit vector \hat{n} will give you magnitude of projection of vector \vec{A} in the direction of \hat{n}=\vec{r}/r, so the component in the direction \hat{n} is (\vec{A}\cdot\hat{n}) \hat{n}
Logged
Bluzkin
Newbie
*
Offline Offline

Posts: 3

«
Embed this message
Reply #62 on: November 21, 2010, 12:40:39 am » posted from:Amsterdam,Noord-Holland,Netherlands

Thanks! that really helped.

Now I just need to understand JS and have a look at the source code Wink
Logged
lookang
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #63 on: April 11, 2011, 07:51:27 am » posted from:SINGAPORE,SINGAPORE,SINGAPORE

some more error when clicking 'VIEW  ejs xml source'
OOPS! EJS XML file (airplane.xml) does not exists!

download it working correctly though  Cheesy
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #64 on: April 11, 2011, 05:51:32 pm » posted from:Taipei,T'ai-pei,Taiwan

Thank you for reporting the problem. It is fixed now.
Logged
Pages: 1 2 [3]   Go Up
  Print  
"Progress, therfore, is not and accident,¡K" ..."Herbert Spencer(1820-1903, British philosopher)"
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
2D Collision « 1 2 ... 5 6 »
Dynamics
Fu-Kwun Hwang 176 457043 Last post September 26, 2013, 12:38:02 pm
by bark46k
Elastic collision and in-elastic collision
Dynamics
Fu-Kwun Hwang 0 9432 Last post May 24, 2009, 04:10:14 pm
by Fu-Kwun Hwang
4 car collision going through two intersections
Request for physics Simulations
Kennyg10 1 6811 Last post August 06, 2009, 11:51:32 am
by Fu-Kwun Hwang
1 D collision carts Elastic and Inelastic Collision
dynamics
ahmedelshfie 6 11487 Last post April 27, 2010, 02:16:18 am
by ahmedelshfie
Collision 2D
dynamics
ahmedelshfie 1 4671 Last post September 24, 2010, 07:22:37 pm
by ahmedelshfie
Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 1.097 seconds with 22 queries.since 2011/06/15