• New Entry

Christmas Candle

Tim on 29 Oct 2022
  • 9
  • 54
  • 0
  • 0
  • 278
[x,y,z]=sphere(151); % Canonical sphere
g=exp(-z)*3; % Taper for flame
f=@surf;
f(x.*g,y.*g,8*z+21,faceA=.5); % Flame; taper is applied to x and y
hold
Current plot held
f(x.*g*1.4,y.*g*1.4,6*z+20,faceA=.2); % Flame; taper is applied to x and y
s=f(x*4,y*4,erf(z*4)*10); % Candle stick; ERF makes it a tapered cyl.
colormap(hot) % Warm it up
shading flat % Erase edges
axis equal off
set(gcf,color='k');
f(x.*g/2,y/2.*g,10*z+23,EdgeC='none'); % Flame; taper is applied to x and y
s.CData=s.CData+conv2(randn(148,128)*15,ones(5,25)/125);
Remix Tree