How can I create the third axis to plot ?
3 views (last 30 days)
Show older comments
Hi Everyone,
There are coordinates (2D) of X and Y points which the matrix is [X Y].
When I plot the [X Y], the graph exists like this (red part);
I want to create Z axis to put each [X Y] point on this axis. the length of Z axis;
Z= 0 : face_width;
for every point on Z , I should create the same graph along Z until the face_width by turning the points around Z axis. the angle for rotating is starting from 0 to helix_angle. the rotating of points must start from 0 degree and increase helix_angle/face_width until the face_width. If we assume helix_angle is 10 degree and face_width is 20 mm, first turned graph's angle is 0.2 degree , second is 0.4 degree ... until 10 degrees. the rotating formulas;
X_rotate = X.*cos() - Y.*sin();
Y_rotate = X.*sin() + Y.*cos();
Thus, I need to create the same graphs behind the original graph along the Z axis while rotating it for an angle.
I think I could not explain my question good enough. I hope , at least, somebody understand a little what I am trying to ask. At least, I hope somebody can give a suggestion.
Thanks to contributers.
4 Comments
Star Strider
on 16 Dec 2015
I remember. I post context information so that people will have some idea of the problem you are solving. In this instance, they need to know you want to create a 3D plot of a gear.
Answers (1)
Steven Lord
on 16 Dec 2015
So you want something like the MAKEVASE example?
2 Comments
Star Strider
on 16 Dec 2015
He’s quite cleverly used MATLAB to design and plot a gear in 2D. (See the third Comment to my Answer in how to copy and rotate a 2D graph around a circle ?.) I infer that he wants to put it in 3D in a way that he can manipulate it in 3D.
See Also
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!