Giter VIP home page Giter VIP logo

iaor's Introduction

Class for calculating Instantaneous Axis of Rotation

This is a custom class_template that makes it easy to calculate and display the intantaneous axis of rotation between two bodies in an AnyBody Model.

Rolling without slipping

You can read more about the code in this blog post on AnyScript.org

Here is a short example on how to use the class. First add the following to the top of your main file.

#include "<ANYBODY_PATH_TOOLBOX>/Rotations/InstantaneousAxisOfRotation.any"

Then add the InstantaneousAxisOfRotation class in one of your studies.

#include "<ANYBODY_PATH_TOOLBOX>/Rotations/InstantaneousAxisOfRotation.any"

Main = {


  // This is a simple example of using the InstantaneousAxisOfRotation class
  // to the calculate and vizualize the instantaneous axis of rotation 
  // between Body1 and Body2
  InstantaneousAxisOfRotation IAOR (AnyRefFrame& Body1, AnyRefFrame& Body2) = 
  {
      // The sphere drawn at the mid point of the vizualized axis.
      #var AnyVar SphereSize=0.02;
      
      // The length of the vizualized axis
      #var AnyVar AxisLength=2;
  
      // The line thickness of the vizualized axis.
      #var AnyVar LineThickness = 0.005;       

   };

Output

The object will IAOR object will plot the axis, and provide the following outputs:

Output variable Type Desciption
RotationAxisDirections AnyVec3 The mid point on axis in Body1 coordinates
RotationMagnitude AnyVec3 The direction of the axis in Body1 coordinates
rc_2 AnyVec3 Point on axis closest to Body2
rc_1 AnyVec3 Point on axis closest to Body1
MotionPitch AnyVar The ratio of linear motion to angular motion
rc_dot AnyVec3 The linear velocity along the axis of rotation
omega AnyVec3 Anuglar velocity vector of Body2 wrt. Body1
r AnyVec3 Position of Body2 wrt. Body1
r_dot AnyVec3 Linear velocity of Body2 wrt. Body1

iaor's People

Contributors

melund avatar

Watchers

James Cloos avatar Jack Liu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.