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.
2D version is as follows:
float cos = (float)Math.Cos(util.DegreeToRadian(turtleAngles.Z)); float sin = (float)Math.Sin(util.DegreeToRadian(turtleAngles.Z)); turtlePosition.X += cos * distance; turtlePosition.Y += sin * distance;