Making Vector Addition programmeable

KingNothing
Messages
880
Reaction score
4
Hello...I really want to make a program that can do vector addition and subtraction, given two or more vectors. The problem is, I'm not sure of the math that would be needed to do it. See, I want the person to be able to enter two or more vectors with a magnitude (length) and angle (with 0 degrees being 'up' and 90 degrees being 'right'). I'm struggling a bit with the actual math that needs to be done. I can do it on paper just fine, because the process of taking a bearing of 1125 degrees and making it 45, etc, things of this nature - is logical. But programs don't understand logic. That's where I hit the roadblock.

I don't think you need to know any programming whatsoever to answer this (granted you know the answer)...just be able to say things like:

1. Sbtract angle a from angle b, save to variable a.

etcetera. I'd a little fuzzy on the part of figuring out how to "get two vectors together" to be prepared to use the law of cosines and whatnot to figure the resultant out. Can you help?
 
Mathematics news on Phys.org
Convert each of the vectors to components in some basis, then add the components.

- Warren
 
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
I'm interested to know whether the equation $$1 = 2 - \frac{1}{2 - \frac{1}{2 - \cdots}}$$ is true or not. It can be shown easily that if the continued fraction converges, it cannot converge to anything else than 1. It seems that if the continued fraction converges, the convergence is very slow. The apparent slowness of the convergence makes it difficult to estimate the presence of true convergence numerically. At the moment I don't know whether this converges or not.

Similar threads

Replies
20
Views
476
Replies
11
Views
3K
Replies
3
Views
9K
Replies
4
Views
3K
Replies
7
Views
2K
Replies
3
Views
706
Replies
3
Views
3K
Back
Top