##plotting a triangle #let the corner opposite "c" be at 0,0 ax <- 0 ay <- 0 #let the line from that corner to the point opposite "a" be along the x-axis ##this is just the side labeled "b" and is that length bx<-tr1@b by<-0 ##now to find the third corner -- opposite the side labeled "b" #this has length a and has one end at the origin and the other ##at x= a cos(theta) ## y= a sin(theta) ## where theta is angleC cx <- tr1@a * cos(angleC(tr1)) cy <- tr1@a * sin(angleC(tr1)) xpos<-c(ax,bx,cx,ax) ypos<-c(ay,by,cy,ay) plot(xpos,ypos) ##now use segments: s<-1:3 segments(xpos[s],ypos[s], xpos[s+1], ypos[s+1])