I understand the ideas behind relativity (4d space time, different speeds see different slices of it, what not), but I've never done the math. If I have something travelling at v1 relative to some frame, and another thing travelling at v2, what is v2 transformed into the reference frame moving at v1? I'm trying to model the twin paradox in a computer program. Oh, and how do I calculate the slope of a reference frame relative to another reference frame? Is it just (+-)gamma?