WOLFRAM

Products
  • Wolfram|One
  • Mathematica
  • Notebook Assistant + LLM Kit
  • Compute Services
  • System Modeler
  • All Products
Consulting & Solutions
  • Wolfram Consulting
  • Industry Solutions
  • Solutions for Education
Learning & Support
  • Wolfram U Courses
  • Wolfram Language Resources
  • Wolfram Community
  • Support FAQs
  • Contact Support
Company
  • About Wolfram
  • Careers
  • Events
  • Educational Programs
  • All Sites and Resources
Wolfram|Alpha
Wolfram Cloud
Your Account
  • Your Account
  • User Portal
Search

Mechanical Systems  / Function Index  /
Previous section-----Next section

Direction
2D/3D

• Direction[vector] returns the direction vector of vector in global coordinates.
• Direction[axis] returns the direction vector of the specified axis.
• vector may be a simple vector or a Mech vector object with head
Vector, Line, or Plane (3D).

• Direction[bnum, lpnt] is interpreted as Direction[Vector[bnum, lpnt]].
• Other Direction[args, ... ] instances are interpreted as Direction[Line[args]].
• Mech's overloading of the built-in Direction symbol has no effect on its usage in other Mathematica code.
• See also:
Angle, Location, Magnitude, Unit.

Further Examples

Load the Modeler2D package.

In[1]:=

Direction returns the direction vector of any Mech geometry object that has the property of having a direction.

In[2]:=
Out[2]=
In[3]:=
Out[3]=

Magnitude returns the length of the direction vector of a Mech vector object, taking advantage of some simplifications.

In[4]:=
Out[4]=

Similarly, Unit takes advantage of the fact that the magnitude of the vector is not a function of the coordinate system that the vector is expressed in. If the vector is already expressed in global coordinates, then such simplifications are not possible.

In[5]:=
Out[5]=
In[6]:=
Out[6]=


  • Products
  • Wolfram|One
  • Mathematica
  • Notebook Assistant + LLM Kit
  • Compute Services
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Engine
  • Wolfram Player

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Facebook X Twitch LinkedIn YouTube Wolfram
© 2025 Wolfram | Legal & Privacy Policy |
English
  • en