• Remix
  • Share
  • New Entry

on 17 Oct 2021
  • 30
  • 39
  • 0
  • 0
  • 274
% Remix from Adam
axes(Camerat=[0 3 3],CLim=[0,5])
colormap hsv
hold
Current plot held
x=meshgrid(0:.03:7);
t=9+9*cos(x);
z={t.*cos(x'),t.*sin(x'),5*sin(x)};
surf(z{:},EdgeA=0);
axis equal
camva(2.5)
campos([0 -166 83])
r=@randi;
n=234; % n = size(z{1},1);
for i=1:900 % ~number of stars
w=r(n); % angle index
q=sub2ind([n,n],[w;w],r(80)+[0;r(9)]); % last arg: radius indices
plot3(z{1}(q),z{2}(q),z{3}(q),'g') % linear; need more chars to follow torus surface.
end
Remix Tree