bowman game

  • Follow


hello,
i'm trying to make a bowman game in 2D in Matlab where the bowman fires a bow and it moves in a parabolic path. The problem I'm facing is how to change the direction of the arrow at each instant so that the arrow moves in a semicircular path.
Any help will be appreciated.
Thank you
0
Reply uzair190 (1) 4/27/2010 5:09:38 AM

Pick some length for the arrow, and the slope of the arrow at any
given x is just the derivative of your parabola function.  Just
standard calculus or pre-calculus.   E.g. y = a0 + a1*x + a2*x.^2, so
slope = a1 + a2 * x.

So you know the center and two end points (from the point-slope
formula for a line) so you can then use line() to plot it.
0
Reply ImageAnalyst 4/27/2010 10:09:27 AM


1 Replies
130 Views

(page loaded in 0.157 seconds)

Similiar Articles:





7/15/2012 9:35:23 PM


Reply: