0

I am currently using opengl to make two cylinders which are joined together in a criss cross fashion in the middle.

They both have to be rotated in the horizontal axis, one 45 degrees in the clockwise direction and the other 45 degrees in the anti clockwise direction.

Am I right in thinking that one will be rotated in the x axis by 45 degrees and the other is to be rotated by 45 degrees in the z axis?

Or is one rotate in the x axis by 45 degrees and the other rotated by 315 degrees(360 - 45)?

I've tried both, and they both look so similar I can't tell which is correct. I'm just struggling to get my head around which is correct!

Thanks lucy

lCopp
  • 25
  • 7
  • What do you mean by horizontal axis? Do the cyls rotate over the same axis (i.e. world space) or each one has its own (local space) axis of rotation? – Ripi2 Apr 06 '17 at 23:16
  • A diagram or picture of what you want to achieve and what you already have, would really help here. – finlaybob Apr 07 '17 at 07:49

1 Answers1

0

Your question looks like it has already been answered here in "How to draw cylinder in y or x axis in opengl"

Which has examples of how to apply rotate to it as well.

Community
  • 1
  • 1
Dan
  • 146
  • 4