Calculate velocity components x,y and z

AI Thread Summary
To calculate the velocity components x, y, and z in a 3D environment based on a velocity value and two angles (yaw and pitch), one must relate pitch to the x-axis and understand the implications of spherical coordinates. The discussion highlights that yaw is along the z-axis, while pitch is typically considered as the angle from the horizontal plane. The user seeks to develop a Java program that calculates the trajectory of a thrown ball, including the time until it hits the ground and its x and y coordinates. There is a consensus that translating initial conditions into velocity components is essential, and learning about spherical coordinates may be necessary for clarity. Overall, the conversation emphasizes the importance of understanding the relationships between the axes and angles in 3D motion.
Redweasel
Messages
3
Reaction score
0
Hello,

I want to calculate the velocity components x, y and z based on a velocity value and two angles (yaw along the z-axis and pitch).

I know how to calculate the x and y components in an 2D-environment:
initial velocity x = initial velocity * cos(theta)
initial velocity y = initial velocity * sin(theta)

But I can't figure out to apply this to an 3D-environment. Can anybody give me some good resources for learning this concept or provide some examples?

Many thanks in advance!

Redweasel
P.S.: Sorry for my bad english
 
Physics news on Phys.org
Redweasel said:
I want to calculate the velocity components x, y and z based on a velocity value and two angles (yaw along the z-axis and pitch).
If the yaw is relative to z axis, then which axis is pitch relative to? This sound similar to spherical coordinates, with r equal to the magnitude of velocity. Note that there are conflicting usages of the symbols used to represent the angles. Link to mathworld article:

http://mathworld.wolfram.com/SphericalCoordinates.html
 
The pitch should be related to the x axis.

The purpose for this is java programming. I want to create a little program where you enter the initial velocity, yaw and pitch and then throw a ball. It then displays the time when it hits the floor (time = zInitialVelocity / g * 2) and the x and y coordinates. Is there a way without the spherical coordinate system?
 
Redweasel said:
The pitch should be related to the x axis.
Related to the x-axis in which direction, towards the y-axis or towards the z axis? You didn's specify the relationship bettween x, y, z axis and the directions left-right, forward-back, up-down. If z-axis is vertical, then pitch could be the angle from horizontal (the x-y plane) (which could be restated as π/2 - angle from z-axis), and yaw would be the angle from x or y-axis along the x-y plane.

Redweasel said:
I want to create a little program where you enter the initial velocity, yaw and pitch and then throw a ball. It then displays the time when it hits the floor (time = zInitialVelocity / g * 2) and the x and y coordinates. Is there a way without the spherical coordinate system?
A velocity, yaw, and pitch implies a spherical like coordinate (magnitude and two angles). You can always translate the initial condition into components of velocity vx, vy, vz. Acceleration can also be split up into ax, ay, az components and position would be x, y, z.
 
Last edited:
I guess I have to learn this spherical coordinate stuff then. Looks quite confusing, but I think I'll find a way. Thanks for your answer
 
Hi there, im studying nanoscience at the university in Basel. Today I looked at the topic of intertial and non-inertial reference frames and the existence of fictitious forces. I understand that you call forces real in physics if they appear in interplay. Meaning that a force is real when there is the "actio" partner to the "reactio" partner. If this condition is not satisfied the force is not real. I also understand that if you specifically look at non-inertial reference frames you can...
This has been discussed many times on PF, and will likely come up again, so the video might come handy. Previous threads: https://www.physicsforums.com/threads/is-a-treadmill-incline-just-a-marketing-gimmick.937725/ https://www.physicsforums.com/threads/work-done-running-on-an-inclined-treadmill.927825/ https://www.physicsforums.com/threads/how-do-we-calculate-the-energy-we-used-to-do-something.1052162/
I have recently been really interested in the derivation of Hamiltons Principle. On my research I found that with the term ##m \cdot \frac{d}{dt} (\frac{dr}{dt} \cdot \delta r) = 0## (1) one may derivate ##\delta \int (T - V) dt = 0## (2). The derivation itself I understood quiet good, but what I don't understand is where the equation (1) came from, because in my research it was just given and not derived from anywhere. Does anybody know where (1) comes from or why from it the...
Back
Top