• Create Account

simple very simple question for the smarter people

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

9 replies to this topic

#1 Anonymous Poster_Anonymous Poster_*   Guests

Likes

Posted 08 November 1999 - 09:33 AM

lets say i haaave two points in an object
__________________
¯¯¯¯¯| |¯¯¯¯¯¯¯¯¯¯\\
------------------/¯¯¯¯¯¯\
_________________| . (5,1,0) point W
. (0,0,0) point X\______/

i use d3dim btw..
if i rotate the object it rotaates around (0,0,0)..
but i want the object to rotate around (5,1,0).. how would i go about doing that?
do i translate point X? or rotate the whole object then translate itsomewhere? how?!

#2 Anonymous Poster_Anonymous Poster_*   Guests

Likes

Posted 04 November 1999 - 07:43 PM

translate the object by (5,1,0),
then rotate

#3Facehat  Members

696
Like
Likes
Like

Posted 05 November 1999 - 01:24 PM

Not quite. Rotate it first then translate it. The last case mentioned is only true if your using OpenGL's glRotate and glTranslate functions. But in everything else you always rotate then translate .

--TheGoop

#4 Anonymous Poster_Anonymous Poster_*   Guests

Likes

Posted 05 November 1999 - 05:18 PM

i think i asked the question wrong.

-----.(0,0,0)-----.(5,0,0)-

i want to rotate it around (5,0,0)
then it would look like

\
\
\. (0,0,0)
\
\
.(5,0,0)

#5 Anonymous Poster_Anonymous Poster_*   Guests

Likes

Posted 05 November 1999 - 05:20 PM

whooooooooops

' -------.(0,0,0)---------.(5,0,0)
' point a point b
. \
. \
. \. a (?,?,0)
. \
. \
. \
. . point b still (5,0,0)
.

#6 Anonymous Poster_Anonymous Poster_*   Guests

Likes

Posted 05 November 1999 - 05:35 PM

i want to rotate the whole object around point b. if you just rotate the object it would rotate around point a.

#7Splat  Members

122
Like
Likes
Like

Posted 05 November 1999 - 05:46 PM

Actually, TheGoop, I believe in this case you translate first to get the pivot point (5,1,0) on the origin, then you rotate, then translate backwards to place the pivot point back where it was originally.

Or am I just completely wrong?

- Splat

#8CJ  Members

122
Like
Likes
Like

Posted 07 November 1999 - 11:14 PM

You make that point (5,1,0) at (0,0,0)...and then you rotate.

------------------
Dance with me......

#9 Anonymous Poster_Anonymous Poster_*   Guests

Likes

Posted 08 November 1999 - 09:20 AM

how would you do that?
but you see i want to rotate it in many different points.

#10Dave Astle  Distinguished Rhino

2312
Like
Likes
Like

Posted 08 November 1999 - 09:33 AM

this is pretty basic. If you want to rotate an object around any point (x, y, z), first just translate it by (-x, -y, -z), then apply your rotation, and translate it again by (x, y, z) to put it back where it was.

[This message has been edited by Myopic Rhino (edited November 08, 1999).]

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.