1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Cats chasing each other

  1. Nov 14, 2004 #1
    I am totally stuck on this problem and really don't even know where to begin. So if someone could point me in the right direction it would be greatly appreciated.

    Q. Four cats are in four corners of a square room of unitary base. At time t=0 they start chasing each other at unitary velocity, so that cat #1 runs in the direction of cat #2, #2 in the direction of #3, #3 in the direction of #4, and #4 in the direction of #1 untill they meet in the center of the room. Compute and plot the trajectories of the cats using Matlab. :confused: :cry:
     
  2. jcsd
  3. Nov 14, 2004 #2
    Can anyone help?
     
  4. Nov 14, 2004 #3
    wouln't it jus make a circle??
     
  5. Nov 14, 2004 #4

    Gokul43201

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    The trajectories will not be circular...I believe they are spirals.

    Here's a similar problem with solution.
     
  6. Nov 14, 2004 #5
    Thanks for the link to the similar problem. That looks very promising as far as establishing the position vectors. I am attatching a pdf image of what the plot is supposed to look like. However I still don't know how to go about tackling this in Matlab. My instructor seems to believe that the whole class is well versed in Matlab even though we have had no formal training on it.
     
    Last edited: Nov 14, 2004
  7. Nov 14, 2004 #6

    Tide

    User Avatar
    Science Advisor
    Homework Helper

    You could just plot the trajectories

    [tex]r = r_0 e^{-(\theta - \theta_0)}[/tex]

    unless your instructor wants you to use MatLab to solve the differential equations.
     
  8. Nov 14, 2004 #7
    That is exactly what he wants.
     
  9. Nov 14, 2004 #8

    Tide

    User Avatar
    Science Advisor
    Homework Helper

    In that case, exploit the symmetry of the problem. At any instant, each cat will be exactly the same distance from each other - and from the center! Also, their "angular coordinates" will be [itex]\pi /2[/itex] out of phase with each other from one to the next.

    With constant speed, v, the equations of motion become

    [tex]\frac {d}{dt} R \cos \theta = - \frac {v}{\sqrt 2} (\sin \theta + \cos \theta)[/tex]

    and

    [tex]\frac {d}{dt} R \sin \theta = \frac {v}{\sqrt 2}(\cos \theta - \sin \theta)[/tex]

    You can have MatLab solve these equations for you but if you want the full solution you can expand the derivatives and with a little algebra you should arrive at

    [tex]\frac {dR}{dt} = - \frac {v}{\sqrt 2}[/tex]

    and

    [tex]R \frac {d \theta}{dt} = \frac {v}{\sqrt 2}[/tex]

    and the rest is straightforward.
     
  10. Nov 14, 2004 #9
    While I understand the mathmatics involved I simply don't know how to enter the equation you have listed above in matlab. I've been tinkering with it for the past hour.
     
  11. Nov 14, 2004 #10

    Tide

    User Avatar
    Science Advisor
    Homework Helper

    I'm sorry - I don't use MatLab so I can't help you with the specifics of that package.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Cats chasing each other
  1. Cat & mouse chase (Replies: 3)

  2. Two boxes on each other (Replies: 12)

Loading...