![]() This is exactly what happens in the above animation. So, if you aim right at the target you would miss. Oh, here is a nice review of the basics dealing with relative velocity. In this convention, v bg will be the velocity of the blaster bolt with respect to the ground. Here I will use the following subscripts: b for the blaster, y for the yellow bird, and g for the ground. Perhaps this is best described with both a vector equation and a diagram. However, we really need the velocity relative to the ground. The blaster bolt fires with a velocity and direction relative to the bird. Why does it miss? Well, you can think of this as a relative velocity problem. You can see the problem here - the blaster bolt misses the target. I changed the color so you could tell it is a different blaster. I will aim at the target, but the velocity will be the constant blaster speed PLUS the velocity of the bird. First, I will do the exact same thing as the above method - but with one change. It's just nice to see the model looking like the game. This just shows the bird and a shot - essentially the same as the actual real Angry Birds Star Wars game (ABSW). After that, I just have an object moving with a constant velocity.This will also give me a unit vector that I can use for the blaster bolt's velocity. From this target location and the location of the bird at that instant, I can find a vector from the bird to the target. There is some target location (I picked the same place that I used in the game). ![]() In this case, I used the cylinder object in VPython. It doesn't really matter when - I just picked a time similar to what I did in the actual game. ![]() How do you model this? Here is my basic plan. Based on my analysis before, I am going to say this blaster shoots at a constant speed of 50 m/s. Now, I need to add the blaster bolt into the model. Really, I should also try to recreate the slow motion effect - but I will leave that as a homework assignment. I'm sure I could get this to work much better if I played around with the initial conditions - but that's not the point.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |