A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Rotating a 3d Point around A 3D Line

  1. #1
    Member
    Join Date
    Aug 2006
    Posts
    77

    Arrow Rotating a 3d Point around A 3D Line

    Line is defined by two 3d points; (0,0,0) and (x,y,z). And there is also this 3d point. How can rotate this 3d point around the line?

    Something like this (points indicate vectors in my expression, it's the same thing) :



    I found some stuff on the internet but I couldn't really figure it out.

  2. #2
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    Take a look at the point transformation stuff inside five3D - you may be able to do what you want without really getting into the math of it if you nest things.
    Please use [php] or [code] tags, and mark your threads resolved 8)

  3. #3
    Member
    Join Date
    Aug 2006
    Posts
    77
    Quote Originally Posted by neznein9 View Post
    Take a look at the point transformation stuff inside five3D - you may be able to do what you want without really getting into the math of it if you nest things.
    I couldn't find anything useful http://five3d.mathieu-badimon.com/docs/as3/

  4. #4
    Junior Member
    Join Date
    Jun 2011
    Posts
    26
    You must find matrix which transform axis X (or other axis) to your line and next do following steps:
    a) mult by inverse matrix (your line is now X axis)
    b) rotate around X axis
    c) mult by matrix (X axis is back to your line)
    Esquimo - Flash 3D

  5. #5
    Member
    Join Date
    Aug 2006
    Posts
    77
    Quote Originally Posted by GoldHand View Post
    You must find matrix which transform axis X (or other axis) to your line and next do following steps:
    a) mult by inverse matrix (your line is now X axis)
    b) rotate around X axis
    c) mult by matrix (X axis is back to your line)
    yes that must be the way but I can't figure it out http://www.euclideanspace.com/maths/...trix/index.htm

  6. #6
    Junior Member
    Join Date
    Jun 2011
    Posts
    26
    You should check function which calculates matrix for target camera where camera is point (0,0,0) and target point is point at the end of your line.
    Esquimo - Flash 3D

  7. #7
    Member
    Join Date
    Aug 2006
    Posts
    77
    Quote Originally Posted by GoldHand View Post
    You should check function which calculates matrix for target camera where camera is point (0,0,0) and target point is point at the end of your line.
    How can I use that matrix?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center