How do you continually rotate an object according to its direction?
3 views (last 30 days)
Show older comments
I am trying to figure out how to rotate an object(rocket), a 3d constantly moving shape, as it orbits the moon, which is constantly spinning. I want to have the rocket facing where ever it is going, as of now it shoots off and faces down. direction_of_rocket = [1 1 1]; rotate(rocket,direction_of_rocket,Direction) ? tried this and did not work out, potentially due to the fact that I am not sure if the alpha in rotate can be a changing number. Thanks for the help!
0 Comments
Answers (1)
Image Analyst
on 21 Apr 2015
What is it? Is it a 2D matrix? A vector? A shape like an ellipse? An image? If it's an image or 2D matrix, simply use imrotate().
2 Comments
Image Analyst
on 22 Apr 2015
Is that an image (a grayscale or full color RGB array), OR a list of (x,y) coordinates saying where the outline of the rocket is (like an N row by 2 column array)?
See Also
Categories
Find more on Graphics Object Properties in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!