Custom Vector Generator
Create, visualize, and export custom 2D vectors with magnitude, angle, and resultant calculation. Download as SVG.
About
Miscalculating vector components in structural analysis, navigation, or game physics leads to cascading errors in force resolution and trajectory prediction. This tool computes 2D vectors from either magnitude and angle (r, θ) or Cartesian components (x, y), resolves the resultant via component summation, and renders a publication-ready diagram. All trigonometric decomposition uses IEEE 754 double-precision floating point. The resultant is calculated as R = âRx2 + Ry2, which is exact for any number of concurrent coplanar vectors. Export produces a standards-compliant SVG file suitable for embedding in technical documents or further editing in Inkscape or Illustrator.
Limitation: this tool handles 2D coplanar vectors only. It assumes all vectors originate from a common point (concurrent). Non-concurrent force systems require moment calculations not covered here. Angle input follows the mathematical convention: 0° points along the positive x-axis, increasing counterclockwise. Pro tip: when resolving forces on an inclined plane, rotate your coordinate system first so one axis aligns with the surface - it reduces the number of vectors you need.
Formulas
Each vector v is defined by its magnitude r and direction angle θ measured counterclockwise from the positive x-axis. The Cartesian components are decomposed as:
vy = r sin θ
Conversely, given components (x, y):
θ = atan2(y, x)
The resultant of n vectors is computed by summing all components and then converting back:
Ry = nâi=1 vyi
R = âRx2 + Ry2
Where r = vector magnitude, θ = direction angle in degrees (converted to radians internally via θrad = θ Ă Ď180), vx and vy = horizontal and vertical components, R = resultant magnitude, Rx and Ry = summed components of all vectors.
Reference Data
| Quantity | Symbol | Formula / Definition | Unit |
|---|---|---|---|
| Magnitude | r | âx2 + y2 | any |
| Direction Angle | θ | atan2(y, x) | ° |
| X-Component | x | r cos θ | any |
| Y-Component | y | r sin θ | any |
| Resultant Magnitude | R | â(âxi)2 + (âyi)2 | any |
| Resultant Angle | θR | atan2(âyi, âxi) | ° |
| Unit Vector | u | v|v| | dimensionless |
| Dot Product | a â b | axbx + ayby | scalar |
| Cross Product (2D) | a Ă b | axby â aybx | scalar (z-component) |
| Angle Between Two Vectors | Îą | acos(a â b|a| |b|) | ° |
| Projection of a onto b | proj | a â b|b| | any |
| Common angle: East | - | 0° | - |
| Common angle: North | - | 90° | - |
| Common angle: West | - | 180° | - |
| Common angle: South | - | 270° | - |
| Common angle: NE diagonal | - | 45° | - |
| Common angle: NW diagonal | - | 135° | - |