• New Entry

Witch-on-Broom (Halloween theme)

Pink_panther on 31 Oct 2021
  • 3
  • 24
  • 0
  • 0
  • 276
%Example 1:
figure('Color',[.95 .95 .1])
hold
Current plot held
dep=9;
%1602 % polygon
xv = rand(dep,1); yv = rand(dep,1);
xv = [xv ; xv(1)]; yv = [yv ; yv(1)];
x = rand(1e4,1); y = rand(1e4,1);
[in,on] = inpolygon(x,y,xv,yv);
plot(xv,yv,x(in),y(in),'.w',x(~in),y(~in),'.r','LineW',13,'MarkerSi',7)
numel(x(~in))/numel(x(in))/2
ans = 7.3126
% x(on),y(on),'-b','LineW',13,'MarkerSi',4)
axis off
Remix Tree
Load full remix tree