Beta

×

# Movement Mathematics

#### syrupMatt (UID: 248267) writes | more than 12 years ago

0

Defining math equations to create movement in a matrix is harder than it looks. If you have a square matrix which is numbered sequentially from the first position from 1 to 81, how do you define a diagnol (or similar single line) path to go from point A in the matrix to point B?

Tried using a "touch" based formula which defines the values in an ever increasing square from the origin and the destination until a common point is found, which is then used as the first point in the line.Defining math equations to create movement in a matrix is harder than it looks. If you have a square matrix which is numbered sequentially from the first position from 1 to 81, how do you define a diagnol (or similar single line) path to go from point A in the matrix to point B?

Tried using a "touch" based formula which defines the values in an ever increasing square from the origin and the destination until a common point is found, which is then used as the first point in the line.

why do i have a feeling this isn't going to work?

### 0 comment

Slashdot Account

Need an Account?

Don't worry, we never post anything without your permission.

# Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

• b
• i
• p
• br
• a
• ol
• ul
• li
• dl
• dt
• dd
• em
• strong
• tt
• blockquote
• div
• quote
• ecode

### "ecode" can be used for code snippets, for example:

``<ecode>    while(1) { do_something(); } </ecode>``
Create a Slashdot Account