Learn R Programming

linkR (version 1.1.1)

defineLinkage: Defines a lever or linkage

Description

This function takes the joint positions, types and constraints of a lever or linkage mechanism or a set of minimum parameters and creates a list of class "linkage" that forms the basic object for model creation and analysis.

Usage

defineLinkage(joint.coor, joint.types, joint.cons, joint.conn = NULL, link.points = NULL, link.assoc = NULL, link.names = NULL, ground.link = NULL, path.connect = NULL, lar.cons = NULL)

Arguments

joint.coor
A matrix of 2D or 3D coordinates that are the joints of a lever or linkage mechanism.
joint.types
A vector of single letters indicating the type of constraints acting on each joint. Supported types are "R", "U", "L" and "P". See Details.
joint.cons
A list or matrix of 3D constraint vectors that correspond to each joint.
joint.conn
A two-column matrix having the same number of rows as joint.coor, specifying the two links that each joint connects.
link.points
A matrix of points associated with one or more of the links in the linkage (optional).
link.assoc
A vector of integers or rownames indicating the link with which each row in points is associated. Required if points is non-NULL but otherwise optional.
link.names
A vector of the link names (optional).
ground.link
A numeric or link name specifying the ground link of the linkage.
path.connect
A list of vectors, each specifying the points to connect (in sequence) with lines when drawing. This parameter is only used when calling the function drawLinkage.
lar.cons
A list specifying long-axis rotation constraints on links with S-joints on each end. This feature will eventually be added into the joint.conn input parameter as network connections.

Value

a list of class "linkage" with the following elements:

Details

Please see linkR Resources for a tutorial on how to use the linkR package and the linkR example gallery for several examples (code and animations) of different linkages that can be created using linkR.

See Also

animateLinkage, drawLinkage