Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Lets say that you want to rotate simple cube around fixed point in center.

Is it possible to use such coordinate system, that you need to use only sine and cosine in order to rotate?

I have done some 3d stuff in VHDL, but i screwed whith coordinate system and is not working correct. I need to make rotation that works in at least two axes.

share|improve this question
Just to clarify: you are trying to do a hardware implementation of this using VHDL? – ChrisE Mar 28 '11 at 22:18
up vote 1 down vote accepted

What you are looking for is the spherical coordinate system. Note that you have to be careful what order you apply the rotations in.

A simple overview of some useful 3d coordinate systems is covered here.

A very distilled set of slides on generic transforms is covered here.

Honestly, given your use of VHDL, I would suggest implementing a 4-element dot product (take two vectors of length 4, multiply them together element-by-element, and sum the products), and use that to create a matrix-vector multiply. If you have the general capability, all the rest of affine math for graphics is within your reach.

share|improve this answer

Hope this helps, but order of operations are important when rotating. You will want to move the object's rotation point to the origin coordinates, rotate it around as many axises as you want, then translate it back into place. That way it will be rotated around that point (its center for example) instead of its position around the origin of the coordinates you are within.

Hope this helps.

share|improve this answer
I have done this allready, I just screwed that made "axe coordinate system" (tan(z/y),tan(z/x)) and then x=cos(ang_x+T(0)) and y=cos(ang_y+T(1)), but this does not go well – ralu Mar 26 '11 at 0:43
If you could edit in your rotation code that might help get to the root of the issue.. Otherwise we will just be guessing ;) – James Mar 26 '11 at 0:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.