# \donttest{
#Examples for cart2bary
c1<-.4; c2<-.6
A<-c(0,0); B<-c(1,0); C<-c(c1,c2);
Tr<-rbind(A,B,C)
cart2bary(A,Tr)
cart2bary(c(.3,.2),Tr)
# }
# \donttest{
#Examples for bary2cart
c1<-.4; c2<-.6
A<-c(0,0); B<-c(1,0); C<-c(c1,c2);
Tr<-rbind(A,B,C)
bary2cart(c(.3,.2,.5),Tr)
bary2cart(c(6,2,4),Tr)
# }
Run the code above in your browser using DataLab