0
\$\begingroup\$

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.

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

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

\$\endgroup\$
2
  • \$\begingroup\$ 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. \$\endgroup\$
    – cyberdemon
    Oct 21, 2012 at 13:33
  • \$\begingroup\$ 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. \$\endgroup\$
    – ggambetta
    Oct 21, 2012 at 16:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .