Beginning Metal - Part 7: Matrices 2D to 3D | Ray Wenderlich

@hsg - this answer took a bit longer :slight_smile: - Australian z​:zzz:.

You might want to investigate Accelerate - it goes beyond linear algebra. I’m afraid I do anything math-y the hard way so that I know what’s happening, but it’s very inefficient I know. As yet my math is lacking, so I can’t be of great help; but I’m working on it :smile: .

In 2014, Apple updated Accelerate, and there’s a video: WWDC14 - Videos - Apple Developer

2017: WWDC17 - Videos - Apple Developer

Jeff Biggus made some playgrounds, but you might need to update the Swift code to be able to run them: GitHub - hyperjeff/Accelerate-in-Swift: Swift example codes for the Accelerate.framework

I find it frustrating that there’s not more documentation and explanations, but I suppose if you know math already, then it’s not necessary.

You could use GLKit, I guess - I did when I started, but didn’t like the opacity. But be careful to realise that the Z axis in OpenGL is -1 to 1, whereas in Metal it’s 0 to 1. I work with perspective projection, which is why I haven’t noticed a great deal of clipping, but according to http://blog.athenstean.com/post/135771439196/from-opengl-to-metal-the-projection-matrix if you work with orthogonal projection it makes a difference.