# Plotting on a curved surface

9 views (last 30 days)
Griffin Polglaze on 24 Jul 2020
This question may be a bit vague but is there anyway to plot these droplets (i.e. the red dots) on a curved surface. All coordinates are in polar form but regarding the plotting surface I'm not sure if there's any way to change it. I have attached a picture of the plot and my code, if anyone is able to suggest any ideas it would be appreciated!
a='.txt';
for i=500
str=int2str(i);
stp= strcat(str,a);
stp
s=size(c)
s1=s(1,1)
s2=s(1,2)
%b=zeros(s1,s1);
b=zeros(500,500);
%S2=sqrt(s1);
%b=zeros(S2,S2);
for ii=1:s1
x(ii,1)=c(ii,1);
y(ii,1)=c(ii,2);
r(ii,1)=c(ii,3);
end
k=0;
for j=1:s1
if(r(j)>=0.005)
k=k+1;
rnew(k,1)=r(j);
xnew(k,1)=x(j,1);
ynew(k,1)=y(j,1);
end
end
S1=k
for l=1:S1
xo=xnew(l,1);
yo=ynew(l,1);
R=rnew(l,1);
for m1=1:1000
m=m1*10/1000;
for n1=1:1000
n=n1*10/1000;
b(m1,n1)=1;
end
end
end
l
end
figure(i);
bas=figure(i);
imagesc(b);
axis([0 1000 0 160]);
axis square;
colormap(jet);
set(bas,'Colormap',mycmap);
print ('-dtiffn',sprintf('%d.tif',bas));
close all;
end
Griffin Polglaze on 24 Jul 2020
It is a 2D shape i.e. r, theta so I don't think surf will be correct to use

Pratheek Punchathody on 31 Aug 2020
Hi,
As all the data are in the polar coordinates (i.e. r and theta) the best possible way to visually represent the data is using the polarplot()” which is in the 2D form.
For more reference and enhancements please refer to the documentation of the "polarplot()" .