Filter löschen
Filter löschen

How can I create the third axis to plot ?

1 Ansicht (letzte 30 Tage)
Ender Rencuzogullari
Ender Rencuzogullari am 16 Dez. 2015
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 Kommentare
Star Strider
Star Strider am 16 Dez. 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.
Ender Rencuzogullari
Ender Rencuzogullari am 17 Dez. 2015
Sir, I found the answer at this link: Plotting many 2D curves on 3D Axis. But I could not arrange it to my code. Length error existed.However, When I apply;
Z_points = 1 : face_width/point_on_flank : face_width;
plot3( X(1:K_1), Y(1:K_1), repmat(Z_points(1:end),size(X_troc_rotate(1:K_1)));
there existed problem which is about length. How can I fix that?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Steven Lord
Steven Lord am 16 Dez. 2015
So you want something like the MAKEVASE example?
  2 Kommentare
Ender Rencuzogullari
Ender Rencuzogullari am 16 Dez. 2015
no Sir, I need to create a few the same graph along the Z axis. to make more clarify;
Star Strider
Star Strider am 16 Dez. 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.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by