• Remix
  • Share
  • New Entry

on 10 Oct 2021
  • 22
  • 126
  • 0
  • 0
  • 276
% Remix of Jr's "Hourglass"
% Create hourglass profile
d=-2:.01:1.2;
p=1./(1+exp(2*d)); % 1/2 the hourglass profile (sigmoidal)
r=[p,flip(p)]; % radii
% Convert profile to surface
t=(0:.01:6.3)';
z=linspace(0,4,642).*(t*0+1); % constants are numel(r) and numel(t)
% Plot hourglass
axes(Colorm=gray,vis=0,vie=[0,9])
hold
Current plot held
surf(r.*cos(t),r.*sin(t),z,EdgeC='n',FaceA=.2)
light
axis equal
% add grains
v=[400,160];
d=(rand(v)-.5).*p(1:2:320)*1.8; %radial distance from XY origin
a=rand(v)*7; % angular position (radians)
plot3(d.*cos(a),d.*sin(a),z(1,10:169),'.')
Image
Remix Tree