Home of the Open Toolkit library

This isn't strictly an OpenTK question so I apologise for posting here but my lack of maths knowledge has tripped me up again.

I'm trying to extend my turtle drawing system into 3 dimensions, however I don't know how to calculate the resulting X,Y & Z co-ordinates given the appropriate rotations. I can manage it fine in 2D space but 3 dimensions is proving to be a bit beyond me.

It's basically the same, but the sin and cos affect the different coordinate pairs.

HOWEVER - it won't work the way you expect, in 3D the order of the rotations matters, i.e. if you rotate by X then Y then Z you end up with a completely different position than if you rotate by Z then Y then X. There are also issues with what are termed gimble locks using XYZ rotations in 3D, the existence of gimble locks is why a lot of 3D software uses quaternions, but they son't translate well to your application.

Before you do anything you need to pick a convention, what does the rotation actually mean, i.e. which axis is it rotating around. At that point you need to do the math to generate the axis and I'd personally just use GL.Rotate.