View source: R/plottingfunctions.R
plot_CGloc | R Documentation |
Plot the center of gravity of each component
plot_CGloc( clean_pts, mass_properties, mass_properties_skin, mass_properties_bone, mass_properties_feathers, mass_properties_muscle, prop_tertiary1, prop_tertiary2, plot_var )
clean_pts |
Dataframe of the key positions of the bird as follows:
|
mass_properties |
Dataframe containing the center of gravity and moment of inertia components of the full wing. |
mass_properties_skin |
Dataframe containing the center of gravity and moment of inertia components of the skin. Formatted with the following columns: "species","BirdID","TestID","FrameID", "prop_type","component","value". |
mass_properties_bone |
Dataframe containing the center of gravity and moment of inertia components of the wing bones. Formatted with the following columns: "species","BirdID","TestID","FrameID", "prop_type","component","value". |
mass_properties_feathers |
Dataframe containing the center of gravity and moment of inertia components of the feathers. Formatted with the following columns: "species","BirdID","TestID","FrameID", "prop_type","component","value". |
mass_properties_muscle |
Dataframe containing the center of gravity and moment of inertia components of the muscles Formatted with the following columns: "species","BirdID","TestID","FrameID", "prop_type","component","value". |
prop_tertiary1 |
Dataframe containing the center of gravity and moment of inertia components of the first tertiary group. Formatted with the following columns: "species","BirdID","TestID","FrameID", "prop_type","component","value". |
prop_tertiary2 |
Dataframe containing the center of gravity and moment of inertia components of the second tertiary group. Formatted with the following columns: "species","BirdID","TestID","FrameID", "prop_type","component","value". |
plot_var |
Character of either "yx" or "yz". Defines the output axes of the plot. |
A plot of the request axes
# refer to the vignette library(AvInertia) # load data data(dat_id_curr, package = "AvInertia") data(dat_bird_curr, package = "AvInertia") data(dat_feat_curr, package = "AvInertia") data(dat_bone_curr, package = "AvInertia") data(dat_mat, package = "AvInertia") data(clean_pts, package = "AvInertia") # 1. Determine the center of gravity of the bird's torso (including the legs) dat_torsotail_out = massprop_restbody(dat_id_curr, dat_bird_curr) # 2. Calculate the inertia of the flight feathers about the tip of the calamus feather_inertia <- compute_feat_inertia(dat_mat, dat_feat_curr, dat_bird_curr) # 3. Determine the center of gravity of one of the bird's wings dat_wing_out = massprop_birdwing(dat_id_curr, dat_bird_curr, dat_bone_curr, dat_feat_curr, dat_mat, clean_pts, feather_inertia, plot_var = 0) # Visualize the center of gravity of each wing component in the x and y axis dat_wing_out = massprop_birdwing(dat_id_curr, dat_bird_curr, dat_bone_curr, dat_feat_curr, dat_mat, clean_pts, feather_inertia, plot_var = "yx") # or the y and z axis dat_wing_out = massprop_birdwing(dat_id_curr, dat_bird_curr, dat_bone_curr, dat_feat_curr, dat_mat, clean_pts, feather_inertia, plot_var = "yz") # 4. Combine all data and obtain the center of gravity, moment of inertia # and principal axes of the bird curr_full_bird = combine_inertialprop(dat_torsotail_out,dat_wing_out, dat_wing_out, dat_id_curr, dat_bird_curr, symmetric=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.