With this function, you can represent either a singleton (one joint), a couple (the difference between two joints), a triplet (the angle between two vectors generated by the three joints). You can as well represent two singletons, two couples and two triplets.

superskeleton(
  joint,
  structure,
  sidekick,
  num.joint,
  num.frame,
  num.x,
  num.y,
  frame.index = NULL,
  body.part,
  color.part,
  plot.title,
  x.legend,
  y.legend,
  x.dilatation = 1,
  y.dilatation = 1,
  x.translation = 200,
  y.translation = 0,
  fps = 30
)

Arguments

joint

The joint dataset: the coordinates of the joints as a function of time

structure

The structure dataset: a first column with the segments composing the structure, two other columns defining the extremities of the segments

sidekick

A dataset formatted to be plotted with the superskeleton function, the sidekick information

num.joint

The index of the column associated with the joint variable

num.frame

The index of the column associated with the frame variable

num.x

The index of the column associated with the x-axis variable represented on the graphical output

num.y

The index of the column associated with the y-axis variable represented on the graphical output

frame.index

The index of the frame you want to represent (static representation)

body.part

The names of the segments you want to represent

color.part

The colour you want to use to represent the segments

plot.title

The title of the graphical output

x.legend

The legend on the x-axis

y.legend

The legend on the y-axis

x.dilatation

The dilatation coefficient on the x-axis

y.dilatation

The dilatation coefficient on the y-axis

x.translation

The translation coefficient on the x-axis

y.translation

The translation coefficient on the y-axis

fps

The number of frames per second

Value

An animation by default or a static representation for a given frame

Examples

if (FALSE) {
data(gaetan_apchagi)
data(human)

S1_right_ankle <- sidekick(joint=gaetan_apchagi, num.joint=2, num.name=8,
num.x=6, num.y=4, joint1="RIGHT_ANKLE", joint2=NULL)

superskeleton(joint=gaetan_apchagi, structure=human, sidekick=S1_right_ankle,
num.joint=2, num.frame=6, num.x=3, num.y=4,  frame.index=NULL,
body.part="RIGHT_ANKLE", color.part="orange",
plot.title="Gaetan - right ankle trajectory", x.legend="Frame",
y.legend="Trajectory in y (cm)")
}

data(gaetan_apchagi)
data(human)
S2_right_ankle_knee <- sidekick(joint=gaetan_apchagi, num.joint=2, num.name=8,
num.x=4, num.y=4, joint1="RIGHT_ANKLE", joint2="RIGHT_KNEE")

superskeleton(joint=gaetan_apchagi, structure=human, sidekick=S2_right_ankle_knee,
num.joint=2, num.frame=6, num.x=3, num.y=4,
frame.index=25, body.part=c("RIGHT_ANKLE","RIGHT_KNEE"),
color.part="orange",
plot.title="Gaetan - right ankle vs. knee trajectory", x.legend="Ankle - y (cm)",
y.legend="Knee - y (cm)")