This is a CLI tool for operation on Vector Quantities.
-
Finds position vector from given two different points in a space.
-
Obtains Magnitude of a Vector.
-
Detects Direction of a Vector.
-
Checks whether the given two vectors are Perpendicular or not.
-
Interactive terminal Interface.
- Install pyinstaller for creating executable file
pip install pyinstaller
To use this :
- Clone the Repository
git clone https://github.com/kunal-mahatha/Vector-CLI.git
- locate the
vector.py
cd Vector-CLI
- make a executable file of
vector.py
pyinstaller --onefile vector.py
- locate the
vector
exe file
cd dist/vector
- locate
cd $HOME/.local/bin
- copy the
vector
exe file to the path variable
cp Vector-CLI/dist/vector
- run the
vector
file
vector
- Hit Enter to continue
Options | Feature | Explaination |
---|---|---|
1 | Find the Position Vector | Takes two points in space and finds the position vector |
2 | Find the Magnitude of the Vector | Takes the position vector and finds its magnitude |
3 | Find if the vectors are perpendicular | Takes two vectors and checks whether they are perpendicular or not |
4 | Find the Direction of the vector | Takes the vector and finds the unit vector |
5 | Exit |
- Type "1"
Enter your Choice : 1
- Enter the position of first point separated by comma
Enter the position 1 : 1,2,3
- Enter the position of first point separated by comma
Enter the position 2 : 2,1,2
- Output
The position vector is along -1i + 1j + 1k
- Type "2"
Enter your Choice : 2
- Enter the arguements of position vector separated by comma
Enter the arguements of position vector separated by comma : 1,2,3
- Output
The Magnitude of the Vector is 3.74
- Type "3"
Enter your Choice : 3
- Enter the position of first point separated by comma
Enter the position 1 : 1,2,3
- Enter the position of first point separated by comma
Enter the position 2 : 3,4,1
- Output
Nope ! The Vectors are not Perpendicular
- Type "4"
Enter your Choice : 4
- Enter the arguements of position vector separated by comma
Enter the position separated by comma : 1,2,3
- Output
The Direction of the vector is along 0.07i + 0.14j + 0.21k
- Type "5"
Enter your Choice : 5
To view the Video Click Here
I aim to make a data structure for visual vector operations from scratch like sympy, numpy, etc. for python.
-
One can do every vector operation
-
One can visualise those in graphical manner
A Scalar or Scalar Quantity is a quantity that can be described by a single element of a number field, such as a real number, often accompanied by units of measurement
A Vector or Vector Quantity is a quantity that has both magnitude and direction. It is typically represented by an arrow whose direction is the same as that of the quantity and whose length is proportional to the quantity's magnitude. Although a vector has magnitude and direction, it does not have position.