Plot 3D Wireframes from Morphologika

[This article was first published on geomorph, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Hi morphometricians,
A quick update: a function to plot Morphologika 3D wireframes using the package geomorph. This routine (or a version of it) will be included in our next package update under the “read.morphologika” function.



# create an array of 10 random 3D specimens with 6 landmarks each to GPA

# create a simple wireframe, e.g., pt1 connects to pt2, 2-to-3, 3-to-4,…etc.
mydata.gpa<-gpagen(data) #gpa landmarks

# choose the largest and/or smallest specimen
max<-which.max(mydata.gpa$Csize) #ID specimen w/largest CS
min<-which.min(mydata.gpa$Csize) #ID specimen w/smallest CS

# wireframe function: wirefun
# Input: 2 matrices: A & W
#  A is the procrustes residualsmatrix
#  W is the wireframe matrix
  plot3d(A,type=”n”, aspect=FALSE,…)
  for(i in 1:dim(W)[1]){

# Plot

To leave a comment for the author, please follow the link and comment on their blog: geomorph. offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)