- /
-
Trumpet Flower
on 19 Oct 2022
- 20
- 68
- 3
- 1
- 277
% Trumpet flower
[R,T]=ndgrid(0:.01:1,linspace(0,2,151));
% Compute a petals curve
W=R.*((abs((1-mod(T*5,2))))/2+.5);
% Compute the disk with the petals built-in
X=W.*cospi(T);
Y=W.*sinpi(T);
% Convert Z to have an S curve to it to make it fluted
z=@(a)(-cospi(W*a)+1).^.2;
Z=z(1.6);
Z(Z>1)=1;% Flatten the trumpet
V=z(1)*2.3;
% Draw the stamen
g=@(i)i(5:end,1:30:151)/2;
plot3(g(X),g(Y),g(V),'g.');
% Draw flower body
surface(X,Y,Z);
shading interp
% Perfect the Axes, etc
axis equal off
light
material([.6
.9
.4])
colormap hsv