- /
-
Rose on Fire
on 21 Oct 2022
- 19
- 55
- 0
- 1
- 263
% Another remix from Eric's code (love these flowers!)
% We get more characters to play with by
% removing ndgrid and using implicit expansion
m=0:.01:1;
T=-.6:.01:20;
x=1-(5/4*(1-mod(3.6*T, 2)).^2-1/4).^2/2;
P=exp(-T/8)/2;
s=sinpi(P);
c=cospi(P);
y=2*m'.^2.*(1.3*m'-1).^2.*s;
S=x.*(m'.*s+y.*c);
X=S.*sinpi(T);
Y=S.*cospi(T);
Z=m'.*c-y.*s;
surf(X,Y,x.*Z,X.^2+Y.^2+Z.^2);
shading interp
axis equal off
view([0 33])
colormap(flip(hot))