Help with 3d trig and moving object

  • Thread starter free-node-5
  • Start date
  • Tags
    3d Trig
In summary, the user is seeking help with equations for controlling the rotation of an object moving along an arc in 3D space. They have already come up with equations for the motion along the arc using an independent variable 't', but need guidance on how to also control the rotation. Suggestions given include using a rotation matrix or defining a function based on the desired path and looking into quaternions for more intuitive control.
  • #1
free-node-5
20
0
first off, sorry if this isn't the correct section for this question
maybe if it's not, someone could move it to a better place
It's not for any class but someone told me that it was similar to mechanics

I have an object in 3d space, say a cone for example, with the tip pointing up (positive Z direction)
The plane on which it rests is the x,y plane

It can have rotations of the form (x,y,z) in radians

To begin, a specific direction is chosen as a Z angle, and the object is to move in the path of an arc through a 2d path, but in the direction of the Z angle

I managed to come up with and test some equations for moving the object along it's path, but I need some equations to make it point (rotation) in the direction that it is moving on the arc

(up at the beginning, sideways in the middle, and down at the end)

The movement is controlled by using an independent variable 't' as the radians traveled on the arc

Here are the equations I'm using for the motion:
xComponent = Cos(theta)
yComponent = Sin(theta)

x = radius * xComponent * Cos( t )
y = radius * yComponent * llCos( t )
z = radius * Sin( t )


Can anyone help me figure out the equations for the rotations?
Any help would be greatly appreciated
Thanks
 
Physics news on Phys.org
  • #2

Thank you for reaching out with your question. From what I understand, you are trying to move an object in 3D space along an arc while also controlling its rotation along the arc. This can be a challenging problem, but I will do my best to provide some guidance.

Firstly, it is difficult to provide specific equations without knowing the exact details of your setup and the constraints you have. However, I can offer some general advice on how to approach the problem.

Since you are already using an independent variable 't' to control the motion along the arc, you could also use this variable to control the rotation. One way to do this is by defining a rotation matrix that takes into account the current value of 't' and rotates the object accordingly.

For example, if you want the object to rotate along the arc in the direction of the Z angle, you could define a rotation matrix as follows:

R = [cos(t) -sin(t) 0;
sin(t) cos(t) 0;
0 0 1]

This matrix represents a rotation around the Z axis by an angle of 't'. You can then use this matrix to transform the object's orientation at each time step.

Another approach could be to define a function that takes in the current value of 't' and outputs the desired rotation for the object. This function could be based on the specific path and motion you want the object to follow.

I would also recommend looking into the concept of quaternions, which are commonly used in 3D graphics and animation to represent rotations. They can provide a more intuitive way to control the orientation of an object along a path.

I hope this helps and provides some direction for you. If you have any further questions, please don't hesitate to ask. Good luck with your project!
 
  • #3


I would suggest using vector calculus and kinematics equations to solve for the rotations of the object. This involves considering the velocity and acceleration vectors of the object as it moves along the arc.

One approach would be to use the tangent vector of the arc at each point to determine the direction the object should be facing. This can be calculated by taking the derivative of the position vector with respect to time. Then, use the cross product of the tangent vector and the initial orientation of the object to determine the axis of rotation. Finally, use the angle between the initial orientation and the tangent vector to determine the amount of rotation needed.

Another approach would be to use quaternions, which are a mathematical tool commonly used in 3D rotations. Quaternions can represent rotations in 3D space and can be used to calculate the orientation of the object at any point along the arc.

I would also recommend consulting with a mathematician or a physics expert for further assistance with the equations. Good luck with your project!
 

FAQ: Help with 3d trig and moving object

How do you use 3d trigonometry to calculate the motion of an object?

In order to use 3d trigonometry to calculate the motion of an object, you will need to have the object's position coordinates and velocity vector at a given time. From there, you can use trigonometric functions such as sine, cosine, and tangent to calculate the object's motion in all three dimensions.

What is the difference between 2d and 3d trigonometry?

The main difference between 2d and 3d trigonometry is the number of dimensions involved. 2d trigonometry deals with two-dimensional shapes and angles, while 3d trigonometry deals with three-dimensional shapes and angles. Additionally, 3d trigonometry involves more complex calculations and can be used to solve problems involving motion and vectors in three dimensions.

Can you explain the concept of vector components in 3d trigonometry?

Vector components in 3d trigonometry refer to the x, y, and z components of a vector in three-dimensional space. These components represent the magnitude and direction of the vector in each dimension. By breaking down a vector into its components, you can use trigonometric functions to calculate its motion in a specific direction.

How does 3d trigonometry apply to real-world scenarios?

3d trigonometry is used in a variety of real-world scenarios, such as engineering, physics, and computer graphics. It is used to calculate the motion of objects in three-dimensional space, determine the angles and distances between objects, and design structures such as bridges and buildings.

What are some common mistakes to avoid when using 3d trigonometry to calculate motion?

Some common mistakes to avoid when using 3d trigonometry to calculate motion include using the wrong trigonometric function, not considering the direction of the vector, and forgetting to convert units. It is also important to double-check your calculations and make sure they make sense in the context of the problem.

Similar threads

Back
Top