Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
bowman game

Subject: bowman game

From: uzair

Date: 27 Apr, 2010 09:09:38

Message: 1 of 2

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

Subject: bowman game

From: ImageAnalyst

Date: 27 Apr, 2010 10:09:27

Message: 2 of 2

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.

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us