Exploring VECTOR Mathematics
Project description
vector_python_package
:V:E:C:T:O:R:S: made easy This version 1.1 is named as "Suryakant"
A python package for vector maths
Installation of the Package
pip install myvectors
having installed "math" python library makes the things smoother
** Youtube Video Tutorials (https://youtube.com/playlist?list=PL6LEAq5DrlOScWUPGQ4YHr-naw-H7OtKz) (https://youtu.be/Tr-d4uQIgqU)
** Colab Notebook (dont forget to check the colab notebook) (https://colab.research.google.com/drive/1brLl8gHiW6yGqMwDKUrsOXMXHm5I_MBW?usp=sharing)
Package Functionalities
The vector is represented by LIST[data structure] in the package
ex: if v(2,3,4) is a vector at (2,3,4) in space then it should be written as v1=[2,3,4] where v1 is a list
1.Magnitude of a vector : A=[2,3,4] magnitude of a given vector
import myvectors
from myvectors import mag
A=[2,3,4]
mag(A)
Output : float number
2. Dot product : A=[2,3,4] B = [1,1,2]
Arguments : two vectors whose dot product is required
import myvectors
A=[2,3,4]
B = [1,1,2]
from myvectors import dot
dot(A,B)
3. Cross product : A=[2,3,4] B = [1,1,2]
Arguments : two vectors whose cross product is required
import myvectors
A=[2,3,4]
B = [1,1,2]
from myvectors import cross
cross(A,B)
4.Projection : A=[1,4,0] B=[4,2,4]
Arguments : two vectors here first vector passed as argument is projected over the second vector
import myvectors
A=[1,4,0]
B=[4,2,4]
from myvectors import projection
projection(A,B)
Output : number i.e projection of A on B
5.Angle : Gives Angle between two vectors A=[3,4,-1] B=[2,-1,1]
Arguments : two vectors , cos/sin , mode(if mode = 0 then angle is in terms of radian if mode = 1 then degrees)
import myvectors
from myvectors import angle
A=[3,4,-1]
B=[2,-1,1]
angle(A,B,"cos",0) # angle in terms of cos and radians
angle(A,B,"sin",1) # angle in terms of sin and degrees
Output : angle in radians if mode = 0 or in terms of degree if mode = 1
6. Triangle area : the vertices of triangle be A=[1,1,1] B=[1,2,3] C=[2,3,1]
Arguments : the co - ordinates of the vertices of the triangle
import myvectors
A=[1,1,1]
B=[1,2,3]
C=[2,3,1]
from myvectors import trianglearea
trianglearea(A,B,C)
Output : Area
7.sectionsutram : divide the line joining two points in the ratio r1:r2 A=[2,3,4] B=[4,1,-2]
Arguments : two vectors, ei representing type of division ('e'= external and 'i' = internal),r1,r2
import myvectors
A=[2,3,4]
B=[4,1,-2]
r1 = 1
r2 = 2
from myvectors import sectionsutram
sectionsutram(A,B,ei,r1,r2)
Output: (A list of length 3) basically vector point with x,y,z co-ordinates
8. collinear or not : checks if three vectors are collinear
A=[1,2,3] B=[11,8,12] C=[10,5,7]
import myvectors
A=[1,2,3]
B=[11,8,12]
C=[10,5,7]
from myvectors import collinear3
collinear3(A,B,C)
Output : If collinear then output is 1 else 0
9. Scalar Triple Product : if three vectors A,B,C then there scalar triple product is =((AXB)dotproduct(C))
A=[1,2,3] B=[11,8,12] C=[10,5,7]
import myvectors
A=[1,2,3]
B=[11,8,12]
C=[10,5,7]
from myvectors import s_triplepro
s_triplepro(A,B,C)
10. Vector Triple Product : if three vectors A,B,C then there scalar triple product is =((AXB)XC)
A=[1,2,3] B=[11,8,12] C=[10,5,7]
import myvectors
A=[1,2,3]
B=[11,8,12]
C=[10,5,7]
from myvectors import v_triplepro
v_triplepro(A,B,C)
11. Vector visualization in 3D space: A given vector say 'V' is visualized in 3-Dimensional space
A = [0,0,2]
import myvectors
A = [0,0,2]
from myvectors import draw_vector
draw_vector(A)
Output : A vector representation in 3-D space.
12. Vector Direction Cosines: Given a vector 'V' it gives the diection cosine
A = [1,2,3]
import myvectors
A = [1,2,3]
from myvectors import direction_Cosine
direction_Cosine(A)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file myvectors-1.1.tar.gz.
File metadata
- Download URL: myvectors-1.1.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.10.1 urllib3/1.26.11 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2bed3c4fa061d20eff8ce1dd4f1f706293b33b07877889fba653370cd15b8cf
|
|
| MD5 |
58d4f23fed7eaedf1ab8bd9a83775a3b
|
|
| BLAKE2b-256 |
c6b056f2afa2fbe9d732b926b44988ac0beb85d7359f4fccbb2c9c86b0580ed3
|
File details
Details for the file myvectors-1.1-py3-none-any.whl.
File metadata
- Download URL: myvectors-1.1-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.10.1 urllib3/1.26.11 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f09fe93d3c76fdb6496e38087955ab2c0ee89fde1fd413d35ddd51631128473b
|
|
| MD5 |
05b21717d8e45ebb7aca2927eeffa41d
|
|
| BLAKE2b-256 |
4e1fb58a08ad909b5b984c45cbb4eef72685d530c9f813b7144be17083fc5b5d
|