![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/699827/image.png)
Plotting letter "D" on 3D space
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have plotted letter "C" on 3d space, in the same way how can i plot letter "D".
I have shared code for plotting letter "C" .
i=0;
for theta=90:5:270;
i=i+1;
points(i,:)=[0.05*(cosd(theta))+0.05 0.05*sind(theta)-0.01 0.00]; % find D alphabets points
end
hold on
plot3(points(:,1),points(:,2),points(:,3),'c', 'LineWidth', 1.5);
xlabel('x');
ylabel('y');
zlabel('z');
axis auto;
view([60,10]);
grid('minor');
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/587806/image.png)
0 Kommentare
Antworten (2)
Nitin Phadkule
am 31 Jul. 2021
i=0;
for theta=90:5:270
i=i+1;
points(i,:)=[0.05*(cosd(theta))+0.05 0.05*sind(theta)-0.01 0.00]; % find D alphabets points
end
hold on
plot3(points(:,1),points(:,2),points(:,3),'c', 'LineWidth', 1.5);
g=size(theta)
a=linspace(0.05,0.05,270)
b=linspace(-0.06,0.04,270)
c= zeros(270); % find D alphabets points
plot3(a,b,c,'c', 'LineWidth', 1.5);
xlabel('x');ylabel('y');zlabel('z');axis auto;
view([180,60]);
grid('minor');
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/699827/image.png)
0 Kommentare
darova
am 1 Aug. 2021
3D letter D
r = [1 1.5 1.5 1 1]; % radius of a circles
t = [-20:10:200 -20]'*pi/180; % closed contour
[T,R] = ndgrid(t,r); % create combinations
[X,Y] = pol2cart(T,R); % convert polar coordinates into cartesian
v0 = t*0;
Z = [v0+.1 v0+.1 v0 v0 v0+.1];
surf(X,Y,Z,'facecolor','red')
axis equal
light
0 Kommentare
Siehe auch
Kategorien
Mehr zu Polar Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!