1
\$\begingroup\$

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.

\$\endgroup\$
1
  • \$\begingroup\$ Just to clarify: you are trying to do a hardware implementation of this using VHDL? \$\endgroup\$
    – ChrisE
    Mar 28, 2011 at 22:18

2 Answers 2

1
\$\begingroup\$

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.

\$\endgroup\$
1
\$\begingroup\$

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.

\$\endgroup\$
2
  • \$\begingroup\$ 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 \$\endgroup\$
    – ralu
    Mar 26, 2011 at 0:43
  • \$\begingroup\$ If you could edit in your rotation code that might help get to the root of the issue.. Otherwise we will just be guessing ;) \$\endgroup\$
    – James
    Mar 26, 2011 at 0:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .