Same idea as the superskeleton function, but here you will represent an additional point and its trajectory. The idea of this function is to study the movement with respect to an additional point. In other words, you will be able to see when one particular part of the structure meets that additional point during the movement.

beyondskeleton(
  joint,
  structure,
  beyond,
  num.joint,
  num.frame,
  num.x,
  num.y,
  y.axis.beyond = "y",
  frame.index = NULL,
  body.part,
  color.part,
  plot.title,
  x.legend,
  y1.legend,
  y2.legend,
  x.dilatation = 1,
  x.translation = 200,
  y.dilatation = 1,
  y.translation = 0,
  size.sup = 4,
  shape.sup = 10,
  color.beyond = "green",
  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

beyond

The data generated by the beyondkick function

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

y.axis.beyond

The dimension of the beyond data you want to represent on the y-axis

frame.index

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

body.part

The name of the joint you want to represent (one joint, different from superskeleton)

color.part

The colour you want to use to represent the joint (different from superskeleton)

plot.title

The title of the graphical output

x.legend

The legend on the x-axis

y1.legend

The legend on the y-axis (left)

y2.legend

The legend on the y-axis (right)

x.dilatation

The dilatation coefficient on the x-axis

x.translation

The translation coefficient on the x-axis

y.dilatation

The dilatation coefficient on the y-axis

y.translation

The translation coefficient on the y-axis

size.sup

The size of the beyond element

shape.sup

The shape of the beyond element

color.beyond

The colour of the beyond element

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)
plexus <- beyondkick(joint=gaetan_apchagi, num.joint=2, num.x = 3, num.y =4,
num.frame=6, origin="RIGHT_SHOULDER", seg1 = c("RIGHT_SHOULDER", "LEFT_SHOULDER", 1/2),
seg2=c("RIGHT_SHOULDER", "RIGHT_HIP", 1/2))

g <- beyondskeleton(joint=gaetan_apchagi, structure=human, beyond=plexus,
num.joint=2, num.frame=6, num.x=3, num.y=4,y.axis.beyond="y",
frame.index=25, body.part="RIGHT_KNEE", color.part="orange",
plot.title="Gaetan: trajectories of the right knee and the plexus
\n according to the y-axis", x.legend="Frame",
y1.legend="Height in cm",y2.legend="Trajectories according to the y-axis",
x.dilatation=1, x.translation=170, y.dilatation=1, y.translation=0, fps=30)

g <- g + geom_hline(yintercept = 0,linetype="dashed") +
geom_vline(xintercept = 0,linetype="dashed") +
geom_vline(xintercept = 200,linetype="dotted") +
geom_segment(aes(x = 200, y = -2, xend = 200, yend = 2)) +
geom_text() +
annotate("text", label = "0",x = 195, y = -8, size = 3, colour = "red") +
annotate("text", label = "0",x = -5, y = -8, size = 3, colour = "red") +
annotate("text", label = "Length in cm",x = 75, y = -8, size = 3, colour = "red") +
annotate("text", label = "Frame",x = 250, y = -8, size = 3, colour = "red") +
geom_segment(aes(x = 225, y = 0, xend = 225, yend = 180),linetype="dotdash") +
geom_text() + annotate("text", label = "Frame 25", x = 225, y = 185, size = 3, colour = "red")
g
}