Vectors

Vector Properties

Vector Basics


There are three perspectives to consider:

screenshot-from-2024-02-02-16-24-05.pngScreenshot from 2024-02-02 16-24-16.png

  1. Physics perspective
    • Vectors are Arrows pointing in space. It is defined by two properties
      1. Length
      2. Direction
  2. Computer Science Perspective
    Screenshot from 2024-02-02 16-25-18.png
    • A vector is an ordered list (array) of number (scalars)
  3. Mathematician (geometric) Perspective: 
    • A vector will be rooted at the origin (zero), which is the center of space and root of all vectorScreenshot from 2024-02-02 16-16-16.png


Vectors are located on a coordinate system, in which Vector Multiplication and Vector Addition is performed 

Basis Vectors

basis-vectors-scaling.gif

If you do not constrain i hat or j hat, then its possible to reach any point of the coordinate system. 

if both are 0, then its stuck in origin. 

Basis Vectors vs Normalized/Unit Vectors

Basis Vectors:

Normalized Vectors:

In summary, while basis vectors are a set of vectors chosen to form a basis for a vector space, normalized vectors are vectors that have been scaled to have a length of 1. Basis vectors may or may not be normalized, depending on the specific context or requirements of a problem.

Technical artists need to understand basis vectors because they play a crucial role in representing and manipulating objects within a coordinate space, particularly in 3D computer graphics and related fields. Here are several reasons why knowledge of basis vectors is essential for technical artists:

  1. Coordinate Systems:

    • Basis vectors define the coordinate system of a space. Understanding the basis vectors allows technical artists to work within different coordinate systems, such as world space, local space, or camera space.
  2. Transformations:

    • Basis vectors are used in transformation matrices to represent translations, rotations, and scaling. Technical artists often apply these transformations to objects in a 3D scene to achieve the desired positioning and orientation.
  3. Rigging and Animation:

    • In character rigging and animation, basis vectors are employed to control the movement and deformation of character joints and bones. They play a role in creating realistic and natural animations.
  4. Texture Mapping:

    • Basis vectors are utilized in texture mapping to define the orientation of textures on 3D surfaces. Technical artists may manipulate basis vectors to achieve specific visual effects.
  5. Shading and Lighting:

    • In shading and lighting calculations, basis vectors are used to determine the direction of light sources and the orientation of surfaces. This is crucial for realistic rendering.
  6. Camera Transformations:

    • Understanding basis vectors helps technical artists manipulate camera transformations, controlling the view and perspective of a scene.
  7. Programming and Scripting:

    • When writing scripts or shaders, technical artists may need to work with basis vectors to implement custom transformations or effects.
  8. Coordinate Conversions:

    • Basis vectors are essential for converting coordinates between different spaces, such as transforming from world space to camera space or vice versa.
  9. Physics Simulations:

    • In simulations involving physics, basis vectors may be used to represent forces and orientations in the simulation space.
  10. Workflow Optimization:

    • Knowledge of basis vectors contributes to an efficient workflow. Technical artists can more effectively control and manipulate objects in 3D space by understanding how basis vectors interact in various contexts.
  11. Procedural Generation:

    • In procedural generation of content, basis vectors are used to create patterns, structures, or landscapes by manipulating coordinates.

Understanding basis vectors is foundational to many aspects of computer graphics, animation, and simulation. It provides technical artists with the tools to position, rotate, scale, and manipulate objects within a 3D environment effectively.

Vector Multiplication

Formula 

image.png

Input: Scalar (Number) and a vector

Output: Vector 

vector-scaling-back-and-forth.gif

vector-scaling.gif

Stretching out the vector twice as long as it started

vector-scaling-with-negative.gif

Vector multiplication plays a crucial role in various aspects of computer graphics and technical art. Here are some applications of vector multiplication for a technical artist:

  1. Scaling Objects:

    • Vector multiplication can be used for scaling objects in a scene. By multiplying the position vectors of vertices by a scaling factor, you can resize objects.
  2. Transformations:

    • In 3D graphics, transformations involve multiplying vectors by matrices. This includes translation, rotation, and scaling. Understanding vector multiplication is essential for implementing these transformations.
  3. Shader Programming:

    • In shader programming, vectors representing colors, positions, normals, etc., are often multiplied by matrices or scalars to achieve desired effects in rendering.
  4. Normalizing Vectors:

    • Vector normalization involves dividing each component of a vector by its magnitude. This operation ensures that the vector has a length of 1. Normalized vectors are often used in lighting calculations and shading.
  5. Cross Product for Surface Normals:

    • The cross product of two vectors is used to compute surface normals. Surface normals are essential for shading and determining how light interacts with surfaces.
  6. Dot Product for Lighting Calculations:

    • The dot product of vectors is used in lighting calculations, such as the Lambertian reflectance model. It helps determine the angle between light and surface normals.
  7. Reflection and Refraction:

    • Vector multiplication is used in calculating reflection and refraction vectors, which are crucial for simulating realistic lighting in computer graphics.
  8. Particle Systems:

    • In particle systems and simulations, vectors representing particle velocities and forces are often multiplied by scalar values to update their positions and behavior over time.
  9. Animation:

    • Vector multiplication is used in animation to apply transformations to objects, bones, or characters. This includes scaling, rotation, and translation.
  10. Physics Simulations:

    • Vector multiplication is used in physics simulations for applying forces, calculating accelerations, and updating positions based on the laws of motion.
  11. Geometry Deformation:

    • Technical artists might use vector multiplication to deform or manipulate the geometry of characters or objects. This can be part of rigging or character animation.

Understanding how to appropriately use vector multiplication allows technical artists to control the appearance and behavior of objects, characters, and scenes in computer graphics applications. It's a fundamental operation in the creation of visually appealing and realistic virtual environments.

Vector Addition

Input: At least 2 vectors 

Output: One Vector 

2D Example 

vector_addition.gifimage.png

image.png

vector addition is the only time we let vectors stray from origin 

Vector addition is a fundamental operation in linear algebra and is widely used in technical art, particularly in computer graphics, animation, and 3D modeling. Here are some specific ways in which vector addition is applied by technical artists:

  1. Positioning and Translation:

    • Vector addition is commonly used to position objects in a 3D space. By adding a translation vector to the original position of an object, technical artists can move the object to a new location.
  2. Animation and Motion:

    • In animation, vector addition is used to represent motion and movement. By adding a displacement vector to the current position of an object over time, technical artists can create realistic animations.
  3. Camera Movements:

    • When manipulating the view or position of a camera in a 3D scene, vector addition is used to control the camera's translation. This is essential for panning, zooming, and tracking shots.
  4. Rigging and Skeletal Animation:

    • In character rigging, vector addition is employed to control the movement of joints and bones. By combining translation vectors, technical artists can create complex and natural movements for characters.
  5. Particle Systems:

    • In simulations and special effects, vector addition is used to model the motion of particles. Forces and accelerations are represented as vectors that are added to the particles' current velocities.
  6. UV Mapping and Texture Coordinates:

    • When mapping textures onto 3D surfaces, technical artists use vector addition to manipulate texture coordinates. This helps in aligning and positioning textures accurately on geometric models.
  7. Lighting and Shading:

    • In shading and lighting calculations, vector addition is used to determine the direction of light sources and reflections. It is essential for calculating the final color values of pixels in a rendered image.
  8. Pathfinding and Collision Detection:

    • In game development, vector addition is often employed in pathfinding algorithms to navigate characters through a 3D environment. It is also used in collision detection to check for intersections between objects.
  9. Procedural Generation:

    • Technical artists may use vector addition to control the procedural generation of landscapes or structures in a 3D environment. By combining vectors, they can define complex patterns and shapes.
  10. Workflow in 3D Software:

    • Vector addition is part of the everyday workflow in 3D modeling and animation software. Artists use it to position, transform, and manipulate objects within the software environment.

Understanding and effectively applying vector addition is crucial for technical artists working in 3D graphics, animation, and related fields. It provides a fundamental tool for controlling the spatial relationships and movements of objects in a virtual space.