How to Change a Horizontal Vector to Move in a 45 degree angle

Click For Summary

Homework Help Overview

The discussion revolves around modifying a velocity vector in vPython to achieve movement at a 45-degree angle while maintaining the same speed in the x-direction. The original vector is <1e7,0,0> m, and the goal is to adjust it to include a y-component that allows for northeast movement.

Discussion Character

  • Exploratory, Mathematical reasoning, Assumption checking

Approaches and Questions Raised

  • Participants explore the relationship between vector components and angles, discussing how to maintain speed while changing direction. Some question the correctness of their attempts, while others clarify the trigonometric principles involved.

Discussion Status

There is a mix of attempts and clarifications regarding the correct application of trigonometric functions to determine the new vector components. Some participants express understanding and confirm their progress, while others seek further clarification on the formulas used.

Contextual Notes

Participants are navigating the implications of using trigonometric functions in the context of vector components, with some uncertainty about the effects on overall speed when adjusting the vector.

Loppyfoot
Messages
192
Reaction score
0

Homework Statement


I am using vPython, and object moves in a +x direction with a vector of <1e7,0,0>m. I need to now change the vector so that it now moves in the same +x direction, but also moving in the northeast direction at an angle of 45 degrees.

The Attempt at a Solution


I attempted <1e7,1e7,0>, and it looks similar to what I need, but I don't know if it is exact or correct.

Thanks for your help.
 
Physics news on Phys.org
Loppyfoot said:

Homework Statement


I am using vPython, and object moves in a +x direction with a vector of <1e7,0,0>m. I need to now change the vector so that it now moves in the same +x direction, but also moving in the northeast direction at an angle of 45 degrees.

The Attempt at a Solution


I attempted <1e7,1e7,0>, and it looks similar to what I need, but I don't know if it is exact or correct.

Thanks for your help.

That will depend upon what vPython thinks the < , , > item is. Is it a velocity vector, with the individual parameters specifying the speed in the x,y,z directions? If so, and you want to keep the speed the same but change the direction, you want to have

[tex]speed = \sqrt{vx^2 + vy^2 + vz^2}[/tex]

If you're dealing with just the x and y directions (planar motion), then you can set your speed and direction as:

[tex]vx = speed \cdot cos(\theta)[/tex]
[tex]vy = speed \cdot sin(\theta)[/tex]

where [tex]\theta[/tex] is the desired direction angle, and use these values as the parameters.

Putting the same value for both the x and y parameters gave you a 45 degree angle, but probably increased the overall speed by a factor of [tex]\sqrt{2}[/tex]
 
Ok, I get it, and I got it working. Thanks for your help.
 
Where do you get the formula:
vx = speed * sin (45)?

Thanks.
 
Loppyfoot said:
Where do you get the formula:
vx = speed * sin (45)?

Thanks.

That's vx = speed * cos(45)

It's basic trigonometry for a right-angle triangle. Vectors in the x and y directions add like the sides of a right angle triangle to form the hypotenuse. The trigonometric functions, sine and cosine, encapsulate the relationships between the angle and the ratios of the lengths of the sides to the hypotenuse.
 
Ok, So the x-component is 1e7cos(45), where the y-component is 1e7sin(45), so the hypotenuse is the vector that makes up both of these components, which allows the object to move in the direction that is 45 degrees from the horizontal.

Is that a decent understanding? Thanks for your help.
 
That's fine. You're good to go!
 

Similar threads

Replies
26
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 21 ·
Replies
21
Views
1K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
15
Views
5K
  • · Replies 10 ·
Replies
10
Views
2K
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K