Which of these is most important in determining how a rock was formed?