rotation

This is a discussion on rotation within the A Brief History of Cprogramming.com forums, part of the Community Boards category; How would I rotate a point around another point (x, y, z) by a certain angle and around a certain ...

  1. #1
    Registered User
    Join Date
    Apr 2002
    Posts
    133

    rotation

    How would I rotate a point around another point (x, y, z) by a certain angle and around a certain axis?






    cross posting is fun
    flashdaddee.com rocks!!!

  2. #2
    Code Monkey Davros's Avatar
    Join Date
    Jun 2002
    Posts
    812
    You could use trig to represent the point in spherical cooridinates, (i.e. your point is represented as two angles & a radius). Move one or both angles, then convert back to cartesian.

    However, I suspect there are much more effecient ways to do this using matrices (which I'm not familar with).
    OS: Windows XP
    Compilers: MinGW (Code::Blocks), BCB 5

    BigAngryDog.com

  3. #3
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    http://www.exhedra.com/DirectX4VB/Tu...M_Matrices.htm

    yes, i know its for VB, but it works the same in any language
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  4. #4
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    >>cross posting is fun
    No, it's a pain in the backside and against the rules. Don't do it. Cross posted threads will (and have been) deleted.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. camera rotation matrix
    By Vick jr in forum Game Programming
    Replies: 5
    Last Post: 05-26-2009, 09:16 AM
  2. Image rotation - doesn't always work
    By ulillillia in forum C Programming
    Replies: 12
    Last Post: 05-03-2007, 01:46 PM
  3. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 04:00 PM
  4. one final problem with rotation
    By DavidP in forum Game Programming
    Replies: 3
    Last Post: 11-19-2003, 03:50 AM
  5. Problem multiplying rotation matrices together
    By Silvercord in forum A Brief History of Cprogramming.com
    Replies: 20
    Last Post: 03-04-2003, 09:20 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21