Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm trying to understand the maths of moving points in a 3d space by making a game written in C#.

I'm looking at this wolfire blog series which explains some basic 3d maths. I've read the first two parts but am stuck on the 3rd. I know it's all really rudimentary stuff but I find Googling for help with equations really hard.

The one I'm struggling with is:

0*(0.66,0.75) + 2*(-0.75, 0.66) = (-1.5, 1.3)

How can anything multiplied by 0 not be 0?

So my question is how does this look in code:

x(a,b) + y(c,d)

I know it's basic stuff but I just can't see it.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

It is zero. 2*0.75 == -1.5 and 2*0.66 == (approximately) 1.3.

share|improve this answer
    
Great, thank you; so it's (0 * 0.66) + (2 * -0.75) , (0 * 0.75) + (2 * 0.66) don't know why I couldn't figure that out. –  cyberdemon Oct 21 '12 at 13:33
    
Exactly. In general, x*(a,b) + y*(c,d) == (xa + yc, xb + yd). With multiplications and additions you never mix the different components of the vectors. –  ggambett Oct 21 '12 at 16:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.