• Remix
  • Share
  • New Entry

on 12 Oct 2022
  • 16
  • 41
  • 0
  • 0
  • 274
% Dahlia
%
% Permutation of the rose where instead of rounded
% petals, use an exponent to make rounded petals.
% This colonop will be used again for the colormap
m=0:.01:1;
[R,T]=ndgrid(m,-2:.01:20);
x=1-abs(1-mod(12.6*T,2)).^2/2;
P=pi*exp(-T/8)/2;
s=@sin;
c=@cos;
u=s(P);
v=c(P);
y=R.^2.*(1.3*R-1).^2.*u;
g=@(f)x.*(R.*u+y.*v).*f(T*pi);
X=g(s);
Y=g(c);
Z=R.*v-y.*u;
surf(X,Y,x.*Z,hypot(hypot(X,Y),Z));
shading interp
axis equal off
% Create a purply colormap
%
% This bit of trickery recycles 'm' from above which happened to
% be the same colonop needed for the colormap.
%
M(1,:)=m;
M(3,:)=m*.1+.9;
colormap(M');
Remix Tree