Results 1 to 2 of 2

Math Help - Complex rotation

  1. #1
    rabidlemming
    Guest

    Question A complex one for you

    Hey,

    I am a flash programmer that has hit a snag and seeing as mathís has never been my strong point I need some help working this problem out

    I have an object (say a ruler) and as I rotate it around the center of the ruler i want to move a box relative to the angle with out rotating the box too. So if the ruler angle was vertical (angle set to 0) then the box x and y cowardliness would be relative to that angle. i want is so no matter what angle the ruler is the box moves around with the ruler always staying with in a set distance to the ruler but never it self rotating

    I can not work out how to get the angle and use it to move the box object around relatively with out also rotating it. I want to move the box around with the ruler but always have its actual rotation always at 0 as it moves around with the ruler

    I want some thing like

    box._x = Math.SomeThing(Take the rotation of the ruler and use its value to work out were the x position of the box needs to be so that it has rotated around with the ruler with out actually rotating it self i.e. so that as the box moves around with the ruler its rotation always remains at 0)

    box._y = Math.SomeThing(Take the rotation of the ruler and use its value to work out were the y position of the box needs to be so that it has rotated around with the ruler with out actually rotating it self i.e. so that as the box moves around with the ruler its rotation always remains at 0)

    I can use any of the following to help:

    Math.abs()
    Computes an absolute value.
    Math.acos()
    Computes an arc cosine.
    Math.asin()
    Computes an arc sine.
    Math.atan()
    Computes an arc tangent.
    Math.atan2()
    Computes an angle from the x-axis to the point.
    Math.ceil()
    Rounds a number up to the nearest integer.
    Math.cos()
    Computes a cosine.
    Math.exp()
    Computes an exponential value.
    Math.floor()
    Rounds a number down to the nearest integer.
    Math.log()
    Computes a natural logarithm.
    Math.max()
    Returns the larger of the two integers.
    Math.min()
    Returns the smaller of the two integers.
    Math.pow()
    Computes x raised to the power of the y.
    Math.random()
    Returns a pseudo-random number between 0.0 and 1.0.
    Math.round()
    Rounds to the nearest integer.
    Math.sin()
    Computes a sine.
    Math.sqrt()
    Computes a square root.
    Math.tan()
    Computes a tangent.
    Property summary for the Math class
    All the following properties for the Math class are constants:
    Property Description
    Math.E
    Eulerís constant and the base of natural logarithms (approximately 2.718).
    Math.LN2
    The natural logarithm of 2 (approximately 0.693).
    Math.LOG2E
    The base 2 logarithm of e (approximately 1.442).
    Math.LN2
    The natural logarithm of 10 (approximately 2.302).
    Math.LOG10E
    The base 10 logarithm of e (approximately 0.434).
    Math.PI
    The ratio of the circumference of a circle to its diameter (approximately 3.14159).
    Math.SQRT1_2
    The reciprocal of the square root of 1/2 (approximately 0.707).
    Math.SQRT2
    The square root of 2 (approximately 1.414).

    Any ideas on how I can do this using some formula?

    Cheers
    Rabid Lemming
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie
    Joined
    Aug 2005
    Posts
    6
    It's sort of hard to visualize this... You have something rotating about a point, and then you have something else which you want to follow it around?

    I have no experience with Flash, so I sort of skipped over the last half of your post. As far as I can tell, if you have your ruler rotating about a point, then why not just pick an "anchor" point for the "static" object? Say your ruler has a coordinate at (0,0) and (0,1). Call your anchor point something like (1,1). If you can center your static object on that anchor point, then you'll be just fine. All you'll need to do when the ruler is rotated about some point (x,y), by some angle theta, is rotate the anchor point about (x,y) by theta (and then of course re-center your static object).

    I'm not sure how comfortable you are with parametric equations for rotations about a point... or how much you'll actually need them... but just tell me if anything I've said so far has helped.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 0
    Last Post: January 14th 2012, 08:02 PM
  2. Rotation in 3d
    Posted in the Geometry Forum
    Replies: 1
    Last Post: November 30th 2011, 03:36 PM
  3. Rotation in complex plane
    Posted in the Pre-Calculus Forum
    Replies: 5
    Last Post: December 12th 2010, 06:44 PM
  4. Replies: 1
    Last Post: September 27th 2010, 04:30 AM
  5. Complex function : composition of a translation, rotation, etc
    Posted in the Differential Geometry Forum
    Replies: 6
    Last Post: September 12th 2009, 06:46 PM

/mathhelpforum @mathhelpforum