Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • VTK VTK
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 740
    • Issues 740
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 197
    • Merge requests 197
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VTK
  • VTKVTK
  • Issues
  • #9544
Closed
Open
Created Sep 14, 2009 by Kitware Robot@kwrobotOwner

Vector projection function

This issue was created automatically from an original Mantis Issue. Further discussion may take place here.


I didn't see anything like this in vtkMath, does it exist somewhere else? Or can this be added somewhere?

void Project(const double* A, const double* B, double* Projection) { //find the projection of A on B double scale = vtkMath::Dot(A,B)/pow(vtkMath::Norm(B), 2); for(unsigned int i = 0; i < 3; i++) Projection[i] = scale * B[i];
}

A "ProjectVectorOnPlane" function would probably also be useful.

Assignee
Assign to
Time tracking