MATLAB | 官方举办的动图绘制大赛 | 第四周(收官周)赛情回顾

MATHWORKS官方举办的迷你黑客大赛第三期(MATLAB Flipbook Mini Hack)圆满结束,虽然我的水平和很多大佬还有比较大的差距,但所有奖也算是拿满了:

专家评选前三名,以及投票榜前十:~

每周的阶段性获奖者:


下面正式开始!

本次比赛要求提交名为drawframe(f)的函数代码,生成长达2s,48帧的动态图,动图生成是依靠如下代码来做到的:

function contestAnimator()animFilename = 'animation.gif'; % Output file namefirstFrame = true;framesPerSecond = 24;delayTime = 1/framesPerSecond;% Create the giffor frame = 1:48drawframe(frame)fig = gcf(); fig.Units = 'pixels';fig.Position(3:4) = [300,300];im = getframe(fig);[A,map] = rgb2ind(im.cdata,256);if firstFramefirstFrame = false;imwrite(A,map,animFilename, LoopCount=Inf, DelayTime=delayTime);elseimwrite(A,map,animFilename, WriteMode="append", DelayTime=delayTime);endend
end

闲话少叙,一起看作品!!


作品概览

Tim / Moonrun

https://ww2.mathworks.cn/matlabcentral/communitycontests/contests/6/entries/16134

function drawframe(f)if f == 1%% Make landscape
clf
rng(4,'v4');
N=200;
q=linspace(-1,1,N);
k=abs(ifft2(exp(6i*randn(N))./(q.^2+q'.^2+1e-9)));
k=rescale(1./(k+1));
imagesc(k);[x,y]=meshgrid(linspace(-1,1,N*7)*7);
k=repmat(k,[7,7]);
surf(x,y,k/2,'edgeC','none','SpecularS',0);
axis equal
colormap(copper)hold on;% Make moon
bscl = 1e5;rng defaultnl=1e4;
rd = rand(nl,1)/3+1;
po = randn(3,nl);
po = po./vecnorm(po);
[p,k,s]=SM(po',rd,7);ms = mean(s);
ns = s - ms;
s = erf(ns*500)/50+ms;[~,~,sb]=SM(po',randn(nl,1),1);% Now, take a page from Adam D.' book for the craters
rng(1,'twister');
x = randn(3,16);     % Let's add 16 craters
x = x./vecnorm(x);mfc = @(x,y,z)y.*(erf((x-z)*30)/2+.5);  % Using erf as the crater function...for n = 1:size(x, 2)d = vecnorm(x(:,n)-p');s = mfc(d',s-1.14,rand(1)/2)+1.14;
ends = s + sb/20;
s = (s-mean(s))/10+mean(s);
p2 = (p.'./vecnorm(p.'))'.*s;E='EdgeC';
F='FaceC';
O='none';
G='FaceA';% Plot moon
hold on;
bscl=1e1;
T2=trisurf(k,bscl*p2(:,1)+1*bscl,bscl*p2(:,2)+4*bscl,bscl*p2(:,3)+1*bscl,'FaceC','flat','FaceVertexCData',rescale(s,.4,1).*[1,1,1],E,O);       % Plot
material([0,1,0,10]);
axis equal off
set(gcf,'color','k');
light('position',[1,-1,1]); 
light('position',[1,-1,1]);camproj p
campos([0,-7.2,.35]);
camva(40);endx = linspace(0, 1, 49)*2;
dx=mean(diff(x));
x = 0:dx:200*dx;
y = cos(pi*x)/15;
a=linspace(0,2*pi,49)-2;
% for n = 1:1:48
n=f;cpos = [0.05, -7.2+2, .42] + [y(n), x(n), y(n)/2];camup([0, sin(a(n))/2, cos(a(n))/2+1]);campos(cpos);camtarget([0.05, -7.2+2, .42] + [y(n+1), x(n+1), y(n+1)/2]);1;endfunction [p,k,s]=SM(in,rd,r)
n=size(in,1);
k=convhull(in);                              % Points on "in" must lie on unit circle
c=@(x)sparse(k(:,x)*[1,1,1],k,1,n,n);        % Connectivity            
t=c(1)|c(2)|c(3);                            % Connectivity
f=spdiags(-sum(t,2)+1,0,t*1.)*r;             % Weighting
s=((speye(n)+f'*f)\rd);                      % Solve for s w/regularizer
p=in.*s;                                     % Apply
end

Tim / Planet and moon

https://ww2.mathworks.cn/matlabcentral/communitycontests/contests/6/entries/16129

function drawframe(f)% Procedural planet & moon
% Apologies for the sloppy code and a couple garbage variables. Based
% around Matlon5 code but forgot to add as a remix.persistent V
if f==1rng(5,'twister');
v=@vecnorm;
ra=@rand;
bscl = 1e5;% Usng a random sphere instead of fibonacci sphere like Matlon5
nl=1e5;
r=ra(nl,1)/3+1;
p=randn(3,nl);
p=p./v(p);
[p,k,s]=SM(p',r,5e1);% Spin points to make a gaseous looking surface...
p2 = (p.'./vecnorm(p.'))';
scl=-7;
p2(:,1:2) = [p2(:,1).*cos(p2(:,3)*scl)-p2(:,2).*sin(p2(:,3)*scl),p2(:,1).*sin(p2(:,3)*scl)+p2(:,2).*cos(p2(:,3)*scl)];% Re-smooth
[p3,k2,s2]=SM(p2,s,3e0);
p3 = (p3.'./vecnorm(p3.'))';% Add a storm in it
xp=[1,1,0.5]';
xp = xp/norm(xp);p2=p3';
for nn = 1:100
pob = p2./v(p2);
for n = 1:size(xp, 2)
if n == 1
xc = XP(xp(:,n),pob);
else
xc = xc + XP(xp(:, n),pob);
end
end
p2 = (p2./v(p2) + xc/1500).*s';
end
p3 = (p2./vecnorm(p2))';E='EdgeC';
F='FaceC';
O='none';
G='FaceA';% Plot planet
T=trisurf(k2,p3(:,1)*bscl,p3(:,2)*bscl,p3(:,3)*bscl,s2,E,O);       % Plot
material([0,1,0,10]);% Make it a purple planet
c1=[88,72,154];
c2=[112,89,145];
c3=[140,120,140];
c4=[180,160,170];
c5=[250,240,242];
c=[c1;c2;c3;c4;c5];cmp = interp1(1:5, c, linspace(1, 5, 256))/255;
colormap(min(cmp.^1.5*1.5,1));
cb = caxis;% % % Add a moon...
rng default
v=@vecnorm;nl=1e4;
rd = rand(nl,1)/3+1;
po = randn(3,nl);
po = po./vecnorm(po);
[p,k,s]=SM(po',rd,7);ms = mean(s);
ns = s - ms;
s = erf(ns*500)/50+ms;[~,~,sb]=SM(po',randn(nl,1),1);% Now, take a page from Adam D.' book for the craters
rng(1,'twister');
x = randn(3,16);     % Let's add 16 craters
x = x./vecnorm(x);mfc = @(x,y,z)y.*(erf((x-z)*30)/2+.5);  % Using erf as the crater function...for n = 1:size(x, 2)d = vecnorm(x(:,n)-p');s = mfc(d',s-1.14,rand(1)/2)+1.14;
ends = s + sb/20;
s = (s-mean(s))/10+mean(s);
p2 = (p.'./vecnorm(p.'))'.*s;E='EdgeC';
F='FaceC';
O='none';
G='FaceA';% Plot moon
hold on;
T2=trisurf(k,bscl*p2(:,1)/3+4*bscl,bscl*p2(:,2)/3-1*bscl,bscl*p2(:,3)/3,'FaceC','flat','FaceVertexCData',rescale(s,.4,1).*[1,1,1],E,O);       % Plot
material([0,1,0,10]);
axis equal off
set(gcf,'color','k');
light; 
light('color',[1,1,1]*.4);
caxis(cb);
V=hgtransform('Parent',gca);
set(T2,'parent',V);
camproj p;
camtarget([0,0,.2]*bscl);
end
a=-1.45:.018:-.59;
camva(9);
c=pi/4-sin(0:.131:2*pi)/10;
campos([sin(c(f)),cos(c(f)),0]*1.3e6);
set(V,'Matrix',makehgtform('zrotate',-a(f)));
endfunction cp=XP(n,p)n=n/vecnorm(n)*.9;
d=sqrt(sum((n - p).^2));
cp=cross(p, n.*ones(1,size(p,2)))./d.^2;endfunction [p,k,s]=SM(in,rd,r)
n=size(in,1);
k=convhull(in);                              % Points on "in" must lie on unit circle
c=@(x)sparse(k(:,x)*[1,1,1],k,1,n,n);        % Connectivity            
t=c(1)|c(2)|c(3);                            % Connectivity
f=spdiags(-sum(t,2)+1,0,t*1.)*r;             % Weighting
s=((speye(n)+f'*f)\rd);                      % Solve for s w/regularizer
p=in.*s;                                     % Apply
% S.D.G.
end

Adam Danz / A light in the attic

https://ww2.mathworks.cn/matlabcentral/communitycontests/contests/6/entries/16114

function drawframe(f)
persistent h x y n wdw
rng default
if isempty(h) || f==1% Dark skyaxes(Position=[0 0 1 1])s = 99;q=linspace(50,1,s);hold on % hold before imagesc to keep ydir normalimagesc(q'.*(q./q),[20,80])% Add star rotationtd=0:0.001:.1; % theta deltan=1000; % number of starstheta = pi/1.8*rand(1,n)+pi-.1;  % range: 180:270 +/- (quadrant III)[x,y]=pol2cart(theta+td',rand(1,n).*s*sqrt(2));x = x+s; % move polaris to the upper right cornery = y+s; % move polaris to the upper right cornerh = plot(x, y,'color','w');rgba = ones(n,4);rgba(:,4) = rescale(randg(1,n,1),.1,1);set(h,{'color'},mat2cell(rgba,ones(n,1),4))% Add grassy hillg = 1000; % number of grass bladesxg = linspace(0,s+1,g);yg = cos(xg/(s+1))*30+randg(1,1,g);area(xg,yg,FaceColor='k')xg=[1,1:.1:s,s];yg=[1,cos(0:.1/98:1)*30+randg(1,1,981),1];fill(xg,yg,'k')% Add house silhouettefill([4 4 3 6 9 8 8]*5,[5 7 7 8 7 7 5]*5,'k')% Add windowwdw=fill(30+2*[-1 1 1 -1],35+[2.2 2.2 .1 .1],[.1 .1 .1]);camva(6)axis equal offxlim([1 s])ylim([1 s])colormap gray
endk = round(f/48*height(x));
set(h,{'XData'},mat2cell(x(1:k,:),k,ones(1,n))',{'YData'},mat2cell(y(1:k,:),k,ones(1,n))')
if f==24wdw.FaceColor = [0.6 0.6 0.4];
end
end

Eric Ludlam / Will O’ Wisp

https://ww2.mathworks.cn/matlabcentral/communitycontests/contests/6/entries/15974

function drawframe(f)E=4; % Size of the forest environment% AbbreviationsJ=@rand;K=@rescale;VN=@vecnorm;persistent Lif f==1set(gcf,'color','k');% Select some nice tree locations%v1=[0 0 1.3%    1.4 0 1%    -1.3 0 1.2%    1 -1 1.3%    -1 -1 1.2%    -.5 -2.1 .9%    .34 -2 1%    .7 -2.3 .8%    -1.5 -4 1%    .6 1 1.2%    .4 2 1.3%    -.55 1.5 1.4];% Below is the compressed version of the above, saving almost 50 chars!v1=reshape(K('啥猸㦴檳䀘䪿岣摏㕱戭巫䦮啥啥啥䀘䀘⢩⫋⑧0檳耀留焗檳滵焗滵梑檳晰檳滵焗猸'-'0',-4,2),12,3);% Compressed version of color array: See parent of this remixB=(['ÆJJ';'ûÁ';'ŽF.';'¶eU';'›_ ';'¡g<';'¢aa';'·‰9'-' '])/256;G=([')™‰';'B¬B';'pé˜';'o™b';' ¡ ';'U~[';'JË«';'RîR']-' ')/256;for i=1:size(v1,1)%% Tree TrunksN=30;Q=.1;  % variation in distance from centerRN=12;  % n pts in bounding ringsrv=[.05 .02]; % Radius valuesrh=[0 1]; % Radius heights% Random pts on cylinderrt=linspace(0,2*pi,RN+1);rt(end)=[];T=[J(1,N)*pi*2 rt rt];h=[K(randn(1,N)) ones(1,RN)*rh(1) ones(1,RN)*rh(2)];% Adjust the radius based on heightR=interp1(rh,rv,h);pts=[cos(T).*Rsin(T).*Rh]';% triangulate the perfect cylindertf=convhulln(pts);% Push points in/out with variance of QD=(1-Q+J(1,size(pts,1))*(Q*2))';tv=pts.*(D.*[1 1 0]+[0 0 1]);        mkP(tf,(tv+v1(i,:).*[1 1 0]).*[1 1 v1(i,3)+.1],i,B,D);%% Tree topsN=150;% Alg for random distribution of pts on a sphere.T=J(1,N)*pi*2;u=J(1,N)*2-1;pts=[0 cos(T).*sqrt(1-u.^2)0 sin(T).*sqrt(1-u.^2)0 u ]';% triangulate the perfect spherelf=convhulln(pts);% Push points around to make foliage frumphyQ=.15;D=(1-Q+J(1,size(pts,1))*(Q*2))';lvr=pts.*D;% Scale down into our world and push up into treetopsss=v1(i,3)*.34;llv=lvr.*[.12+ss .12+ss .08+ss]+[0 0 .1];mkP(lf,llv+v1(i,:),i,G,D);%% Bumpy high-res groundN=400;Q=.2;% coordinatesT=J(1,N)*2;R=J(1,N)+.05;x=cospi(T).*R*E;y=sinpi(T).*R*E;% Triangulate the flat disc so we can draw itpv=[x' y'];pf=delaunay(pv);% VariationD=(J(1,size(pv,1))*Q)';% flip faces due to normals needing to match treesmkP(fliplr(pf),[pv D],4,G,D);end%% Our Wisp!L=line(1,1,1,'Marker','.','Markers',20,'Color','y');light('color','k'); % This light forces normals to be% computed on the patches but since it% is black, it has no visible effect.%% Decorate!set(gca,'position',[0 0 1 1],'vis','off','proj','p');axis([-E E -E E -1 E]);view(3);daspect([1 1 1]);campos([0 3 .5]);camva(60);camtarget([0 0 .7]);drawnow; % Force all vertex normals to be computedend%% Update Lightlp=[cospi(f/24)*.5 sinpi(f/24)*1.5-.5 cospi(f/12)*.2+.7];set(L,'XData',lp(1),'YData',lp(2),'ZData',lp(3));%% Apply lighting to all the patchesO=findobj('type','patch');for i=1:numel(O)doL(O(i));endfunction doL(p)% Perform a lighting operation on the object provided in p.% This algorithm is an adaption from the ML lighting% algorithm in webGL, but ignoring specular (to make it% spooky) and adding in distance based ambient lighting,% and adding range to the local light.cp=campos;v=p.Vertices;% Distance from camera, extending to range.gl_dist=K(min(VN(v-cp,2,2),max(E)),'InputMin',0,'InputMax',E*3);% Weight of ambient lighting.  Desaturate some of the red on tree in frontw_amb=[.3 .4 .4].*(1.1-gl_dist);% Effects of the wisps_diff=.7; % diffuse strengthlr=1.5; % max distance light can illuminated=v-lp;l_dist=min(VN(d,2,2),lr);s_dist=1-K(l_dist,'InputMax',lr,'InputMin',0);% Diffuse Weight% Invert vertex normals due to faces being in wrong order and - being shortw_diff=L.Color.*dot(-p.VertexNormals,d./VN(d,2,2),2)*s_diff;% CbaseColorFactor (ambiant and diffuse)bcf = min(max(w_diff,0), 1).*s_dist;% Accumulate all the terms and put on patch as colorset(p,'FaceVertexCData',min(p.UserData.*(w_amb+bcf), 1));end%% Shorten patch creationfunction mkP(f,v,i,C,D)% f - faces% v - vertices% i - thing index% C - Array of colors to pick from% D - distance array% Create our colors based on DbC=C(mod(i,size(C,1))+1,:);C2=hsv2rgb(rgb2hsv(bC).*[.1 1 .3]);q=bC-C2;fvc=K(D)*q+C2;% Create patch and stash colorspatch('Faces',f,'vertices',v,'EdgeC','n','FaceC','i',...'Amb',1,'FaceL','g','FaceVertexC',fvc,'U',fvc);endend

ME / View from a train window

https://ww2.mathworks.cn/matlabcentral/communitycontests/contests/6/entries/15834

function drawframe(f)
persistent Y
if(f==1)r = rand(1,4000);for i=1:5Y(i,1:800) = smoothdata(smoothdata(r(800*(i-1)+1:i*800)));end
end
clf
hold on
phi = linspace(0,1,4);
patch([1 30 30 1],[0 0 1.5 1.5],phi);
colormap(sky);
c = bone(8);
m = fliplr(1:5);
for i=5:-1:1area(Y(i,1+(m(i)-1)*f:30+(m(i)-1)*f)+(i/10),'FaceColor',c(i,:),'EdgeAlpha',0)
end
hold off
axis([1 30 0 1.5])
set(gca,'XTick',[],'YTick',[])
end

Tim / Snowfall

https://ww2.mathworks.cn/matlabcentral/communitycontests/contests/6/entries/15824

function drawframe(f)
clf% Face parameters for the mother (right) and child (left) that control
% things such as cheek shape, general head structure, eyes (open v. closed)HP=[2,4;.35,.45;8,4;.35,.3;.48,.52;1.28,1.32;2.3,2.2;1,-1;-.4,.3;.8,.75;4,20];% Mother's face
[x,y,z]=face(400,HP(:,2));% Rotation
a=@(x,y,r)x*cos(r)-y*sin(r);
b=@(x,y,r)x*sin(r)+y*cos(r);% Plot
r=.17;
S=@(x,y,z)surf(x,y,z,'EdgeC','none','FaceC',[1,1,1],'DiffuseS',.2,'SpecularE',1,'SpecularS',1,'AmbientS', 0.0);
S(a(x,y,r)-.2,z,b(x,y,r)-.1);
axis equal off
set(gcf,'color','k');% Light
light('pos',[-1.3,-1,.6]);
camzoom(2.8);
hold on;
% Child's face
[xa,ya,z2] = face(400,HP(:,1));
x2=a(xa,ya,.1);
r=.35;
S(-b(x2,z2,r)*.8-.8, a(x2,z2,r)*.8+.4, b(xa,ya,.1)*.8-.8);
camva(5)campos([-7,-15,3]);
camtarget([-.6,0,-.45]);rng default
N=99;
r=@rand;
a=r(N,1)*2*pi;
z=r(N,1);
a=a+(0:.25:2)*pi;
z=z.*ones(1,9);
d=r(N,1)*2+1;
d=d.*ones(1,9);
g=linspace(0,pi/4,49);
a=[a;a;a;a;a];
d=[d;d;d;d;d];
d=d(:);
z=[z;z-1;z+1;z-2;z+2];
c=a(:)+g(f);
scatter3(d.*cos(c)*2-.6,d.*sin(c)*2,z(:)-f/49,rescale(-d.*(cos(c)+sin(c)))*99+1,'w','filled','MarkerFaceA',.5);
plot3(0,1,-2,'k.','markers',1000)
endfunction [x,y,z]=face(n,P)% Start with a basic sphere
[x,y,z]=sphere(n);
% General distortions to make it more face like
z=erf(z*P(10));
x(y<0)= x(y<0)-abs(y(y<0)).^P(1)*P(2);
z(y<0)= z(y<0).*(1-.5*y(y<0).^P(3));
z(y>0)=z(y>0).*(1-.1*y(y>0).^2);
x(x<0)= erf(0.6*x(x<0))/0.6;
x(x>0)=x(x>0)*.9;
y(y>0)=y(y>0)*.9;
y=y+P(4);z(y>0)=z(y>0).*exp(-x(y>0).^2/3).^y(y>0);
y=y-.3;
x=x+.6;
x(x>0)=x(x>0)*.9;
x=x-.6;m=@(x,o,s).5-erf(-s*x+o).*erf(s*x+o)/2;
c=y(x<0);
c=1-exp(-(c+(exp(c*3)-0.4)).^2*3).*(.7*m(z(x<0),.8,10)+.3).*.1;
x(x<0)=c.*x(x<0);
fc=@(x)exp(-(-x+(exp(-x*9)-.6)).^2*2);
fc2=@(x)exp(-(-x+(exp(-x*2)-.6)).^2*2);% Adding nose & lips
x(x<0)=((1-1*m(z(x<0),2,15)).*(fc(y(x<0)*1+P(5))*.15)+1).*x(x<0);
x(x<0)=((1-1*m(z(x<0),.7,8)).*(fc(y(x<0)*2+P(6))*.08)+1).*x(x<0);
x(x<0)=((.7-.7*m(z(x<0),0,8.5)).*(-fc(-y(x<0)*P(7)-1.71)*.06)+1).*x(x<0);x=x+.5;
x(x>0)=x(x>0).*(1-.35*fc2((y(x>0)+.95)/1.4));
x=x-.5;z=z.*(((x-.2).^2+(y+.4).^2).^.4*.2+.8);
x=x+.5;% Adding eyes
[x,y,z]=ey(x,y,z,P,1);
[x,y,z]=ey(x,y,z,P,-1);
endfunction [x,y,z]=ey(x,y,z,P,s)
b=@(x)tanh(exp(-4*abs(x).^2.5));
xt=(z(x<0)+s*0.33)*5;
yt=(y(x<0)+.145)*7;
ofs=max(b2(yt+P(8)*.2*xt.^2,P(9),P(11)).*b(sqrt(xt.^2+yt.^2)), b(sqrt(1.5*xt.^2+yt.^2))*.7);
x(x<0)=x(x<0)-ofs/20;
end% Bump function with edge for eyes
function m=b2(x,of,s)
m=(erf((x+of)*s)/1.5+.5)+exp(-(x+(of-.1)).^2*10)/4;    
%S.D.G.
end

Nikolay Velkov / O Christmas Tree

https://ww2.mathworks.cn/matlabcentral/communitycontests/contests/6/entries/15939

function drawframe(f)% This is Xor's AMAZING shader% https://www.shadertoy.com/view/7lKSzw% Here is my translation to MATLABiRes = 300;iTime = f/48*2;persistent fragCoordif isempty(fragCoord)[x,y]=meshgrid(1:iRes, 1:iRes);fragCoord = cat(3,x,flip(y,1));endim = mainImage(fragCoord);im = imresize(im, [3*iRes, 3*iRes], 'method', 'bilinear');imshow(im);axis equalaxis off%% magicfunction finalColor = mainImage(fragCoord)finalColor = zeros(iRes, iRes, 3);r = cat(3,iRes,iRes);for i=0:400if mod(i,8) < 6even =  mod(i,2);c = [even,1- even,0];elsec = [1 1 1];endp = (fragCoord.* 2 - r)./r(:,:,2).*300 + cat(3,0,i-230)....+ cat(3,i+mod(i,99),i/4).*cos(iTime.*0.5+cat(3,i,i+11)).*0.5;for j = 1:3finalColor(:,:,j) = finalColor(:,:,j) + c(j)./vecnorm(p,2,3).^2;end endfinalColor = sqrt(finalColor./0.1);
end
end

HyunGwang Cho / Nyancat

https://ww2.mathworks.cn/matlabcentral/communitycontests/contests/6/entries/15839

function drawframe(f)
n=nan;% resample
f = mod(ceil((f)/2)-1,12)+1;% canvas
C=ones(69,124)*13;% rainbow
r=([1;1;1]*(7:12));
r=r(:);
r1=28:45;r2=r1-1;
if mod(f,4)<2r1=r2;r2=r1+1;
end
C(r1,[1:6,15:22,31:38,47:53])=repmat(r,[1,29]);
C(r2,[7:14,23:30,39:46])=repmat(r,[1,24]);% stars
a=[2,4,2,0,0,3];
a=mod(a+f-1,6);
y=[-1,8,20,42,54,64];
x=[61,3,21,30,9,55];
x=x-(f-1)*7;
for i=1:6C=p(C,x(i),y(i),s(a(i)));C=p(C,x(i)+84,y(i),s(a(i)));
end% tail (detail)
% z=nan(10,7);
% a=z;a(3:5,3:4)=1;a(5:6,5:7)=1;a([4,7],6:7)=0;a(3:4,[2,5])=0;
% a([22,25,32,36,46])=0;t{1}=a;t{5}=a;t{7}=a;t{11}=a;
% a(2,:)=n;a([4,5,15,26,56,65])=0;a([14,25])=1;t{4}=a;t{10}=a;
% a=z;a([12:11:67,13:11:46,31:11:64,41:11:63,11,21,66])=0;
% a([22:11:55,32:11:65])=1;t{6}=a;t{12}=a;
% a=z;a(7:8,3:6)=1;a(67)=1;a([6,9],4:6)=0;
% a([17,18,27,29,58,65,66,68])=0;t{2}=a;t{8}=a;
% a([17,59,56,66])=n;a([19,30,40,55])=0;a([29,39])=1;t{3}=a;t{9}=a;
% C=p(C,46,33,t{f});% tail (simple)
z=nan(10,7);
a=z;a(3:5,3:4)=1;a(5:6,5:7)=1;a([4,7],6:7)=0;a(3:4,[2,5])=0;
a([22,25,32,36,46])=0;t{1}=a;t{6}=a;t{7}=a;t{12}=a;
a(2,:)=n;a([4,5,15,26,56,65])=0;a([14,25])=1;t{2}=a;t{5}=a;t{8}=a;t{11}=a;
a=z;a(7:8,3:6)=1;a(67)=1;a([6,9],4:6)=0;
a([17,18,27,29,58,65,66,68])=0;t{3}=a;t{4}=a;t{9}=a;t{10}=a;
C=p(C,46,33,t{f});% foot
a=nan(3,6);a(:,2:5)=0;a(1:2,3:4)=1;a(6)=n;a(16)=0;
x=[6,7,6,4,4,6];x=[x,x]+50;x=x(f);
y=[3,4,4,4,4,3];y=[y,y]+40;y=y(f);
C=p(C,x,y,a);C=p(C,x+10,y,a);C=p(C,x+15,y,a);
a=zeros(5,4);a([1,2,6,20])=n;a(3:4,2:3)=1;a(18)=1;
C=p(C,x-4,y-2,a);% body
a=zeros(18,21);a([1,2,18,19])=n;a(2:17,2:20)=4;a([20,35])=0;
a(3:16,3:19)=5;a([39,40,51,52,57,70])=4;a(:,21:-1:18)=a(:,1:4);
b=[66,77,87,100,140,152];a([b,b+143])=6;
y=ones(1,12);y([1,6,7,12])=0;y=y+26;
C=p(C,53,y(f),a);% head
a=ones(13,16);a([1:5,11:14,25:26,39])=n;
a(1,5:9)=n;a(2,6:9)=n;a(3,7:9)=n;
a(6:9,1)=0;a(2:5,2)=0;a([10:14:52,40:14:82,27])=0;
a(13,5:9)=0;a(4,8:9)=0;a(:,16:-1:8)=a(:,1:9);
a(9:10,[3,4,14,15])=2;a(11,6:12)=0;a([75,114,153,125])=0;
a(7:8,[5,6,12,13])=0;a([59,150])=3;
x=[1,1,1,0,0,0];x=[x,x]+63;
y=[0,1,1,1,0,0];y=[y,y]+31;
C=p(C,x(f),y(f),a);% color map
m=[0,0,0;164,164,164;248,176,165;254,254,254;252,218,170;247,185,251;245,123,188;245,62,31;250,167,52;254,238,71;89,216,58;19,154,248;109,92,247;0,78,147]/255;% draw
imshow(uint8(C),m);
endfunction b=s(n)
x4=@(a) a([1:4,3:-1:1],[1:4,3:-1:1]);
z=nan(4);
a=z;a(16)=3;s{1}=x4(a);
a=z;a([12,15])=3;s{2}=x4(a);
a=z;a([8,12,14,15])=3;s{3}=x4(a);
a=z;a([4,8,13,14,16])=3;s{4}=x4(a);
a=z;a([4,6,13])=3;s{5}=x4(a);
a=z;a([4,13])=3;s{6}=x4(a);
b=s{n+1};
endfunction Y=p(I,x,y,S)
Y=padarray(I,[84,84]);
a=y+83+(1:size(S,1));
b=x+83+(1:size(S,2));
Y_=Y(a,b);
i=~isnan(S);
Y_(i)=S(i);
Y(a,b)=Y_;
Y=Y(85:153,85:208);
end

Daniel Pereira / Earth, our only home

https://ww2.mathworks.cn/matlabcentral/communitycontests/contests/6/entries/15769

function drawframe(f)persistent x;if f==1gx = geoaxes(gcf,'Position',[0 0 1 1],'Basemap','colorterrain','grid','off','tickdir','none');gx.Scalebar.Visible = "off";geolimits([-90 90],[-180 180]);x = getframe(gcf);x = x.cdata;endset(gcf,'color','k');rng(41);scatter3(2*rand(20,1)-1,2*rand(20,1)-1,-ones(20,1),'.w'); hold on;scatter3(2*rand(20,1)-1,ones(20,1),2*rand(20,1)-1,'.w');scatter3(ones(20,1),2*rand(20,1)-1,2*rand(20,1)-1,'.w');lt = linspace(-90,90,size(x,1));ln = linspace(-180,180,size(x,2));[LT,LN] = meshgrid(lt,ln+7.5*f);surf(cosd(LT').*cosd(LN'),cosd(LT').*sind(LN'),-sind(LT'),'cdata',(double(x)/255).^2,'edgecolor','none');axis equal off;hold off;% camlight(30,25);light('style','infinite','color',[0.95 1 0.9],'position',[cosd(180)*cosd(45) cosd(180)*sind(45) sind(180)]);material dull;
end

Nikolay Velkov / Collatz Tree

https://ww2.mathworks.cn/matlabcentral/communitycontests/contests/6/entries/15617

function drawframe(f)%% Draw the Collatz tree% initialize cycleG = graph([1 2],[2 4]);% starting numbern = 4; % depthdepth = round(f^(3/4)); % do recursionG = collatz(G,n,depth); % remove auto-added isolated nodesisolated_nodes = find(degree(G) == 0);G = rmnode(G,isolated_nodes);% create figurefig = figure;colormap coolp = plot(G);layout(p,'layered','direction','right')for j = 1:G.numedgesedge = table2array(G.Edges(j,:));labelnode(p,edge,string(edge));endp.NodeCData = cellfun(@str2double, p.NodeLabel);p.MarkerSize = 4;p.LineWidth = 1;p.NodeLabel = {};p.EdgeColor = 'w';cbar = colorbar;cbar.Color = 'w';cbar.FontSize = 12;axis offfig.Color = 'k';
end%% Collatz conjecture rule
function G = collatz(G,n,depth)if mod(n,3) == 2R = [2*n, (2*n-1)/3];elseR = 2*n;enddepth = depth -1;if ~depth return endfor j = 1:length(R)G = G.addedge(n,R(j));G = collatz(G,R(j),depth);end
end

O / Skywheel

https://ww2.mathworks.cn/matlabcentral/communitycontests/contests/6/entries/15367

function drawframe(f)persistent u w c gu g1 g2 c1 cd a0;
cp=@(a,c) colormap(a,c);if f==1rd=@(v) round(v);
sf=@(x,y,z) surface(x,y,z,EdgeColor='no');n=1e2;[x,y,z]=mkp(10,9.8,n);
z=.2*z-.1;[x1,y1,z1]=sphere(4);
x1=.1*rd(x1);
y1=.1*rd(y1);
z1=12*rd(z1);[z2,y2,x2]=mkp(1,.95,n);
z2=z2+12;
x2=.1*x2-.05;[z3,y3,x3]=mkp(.9,.01,n);
z3=z3+12;
x3=.9*x3-.45;a0=axes;
view(3);r0=30;
[x0,y0,z0]=sphere(n);
sf(r0*x0,r0*y0,r0*z0);hold on;c0=cp(a0,'abyss');
c0=flip(c0);
c0(:,1:2)=c0(:,1:2)/2;
c0(:,3)=c0(:,3)/1.4;c1=cp(a0,'sky');
cp(a0,c1);cd=(c0-c1)/48;rs=25;
ns=2e2;
ts=rand(ns, 1)*pi+pi;
ps=acos(rand(ns, 1));
xs=rs*sin(ps) .* cos(ts);
ys=rs*sin(ps) .* sin(ts);
zs=rs*cos(ps);rdsz=3*rand(ns, 1);
rdc=repmat((rand(ns, 1)+1)*.5, 1, 3);u=scatter3(xs,ys,zs,rdsz,rdc,'fi');gu=hgtransform(Pa=a0);
set(u,Pa=gu);campos([-10 -2 5]);
camtarget([0 -15 10]);
camva(49);axis equal off;a1=axes;
view(3);cm=cp(a1,'spring');
cm=cm/2;
cp(a1,cm);
material metal;light(Po=[-10 0 20],St='local');
light(Po=[-10 -30 5],St='local');
light(Po=[-20 -20 20],Col=[.7 .7 .5],St='local');axis equal off;s=[1 .8 .7];for i=1:3x=s(i)*x;y=s(i)*y;z=s(i)*z;w(i+12)=sf(z-.5,y,x);w(i+14)=sf(z+.5,y,x);
endt=pi/6;
rx=[1 0 0;0 cos(t) -sin(t);0 sin(t) cos(t)];for i=1:6[x1,y1,z1]=rot(x1,y1,z1,rx);w(i)=sf(x1-.5,y1,z1);w(i+6)=sf(x1+.5,y1,z1);
endfor i=1:12[x2,y2,z2]=rot(x2,y2,z2,rx);c(i,1)=sf(x2-.4,y2,z2);c(i,2)=sf(x2+.4,y2,z2); 
endfor i=1:12[x3,y3,z3]=rot(x3,y3,z3,rx);c(i,3)=sf(x3,y3,z3);
endalpha(c(:,3),0.2);g1=hgtransform(Pa=a1);
set(w,Pa=g1);g2=hgtransform(Pa=g1);
set(c,Pa=g2);campos([-10 -2 5]);
camtarget([0 -15 10]);
camva(49);endr=f*pi/6/48;
rx1=makehgtform(xrotate=r);
tl1=makehgtform(translate=[0 -sin(r) -cos(r)]);
set(g1,Ma=rx1);
set(g2,Ma=tl1);
rx2=makehgtform(yrotate=pi/9,zrotate=r/10);
set(gu,Mat=rx2);if f<=24c1=c1+cd;alpha(u,f/24)
elsec1=c1-cd;alpha(u,(48-f)/24)
end
cp(a0,c1);endfunction [x,y,z]=mkp(or,ir,n)x=zeros(5,n+1);y=x;z=x;[x([1 4],:),y([1 4],:),z([1 4],:)]=cylinder(ir,n);[x(2:3,:),y(2:3,:),z(2:3,:)]=cylinder(or,n);x(5,:)=x(1,:);y(5,:)=y(1,:);z(5,:)=z(1,:);
endfunction [x,y,z]=rot(x,y,z,t)r=@(v,s) reshape(v,s);s=size(x);p=[x(:) y(:) z(:)]';p=(t*p)';x=r(p(:,1),s);y=r(p(:,2),s);z=r(p(:,3),s);
end

Tim / Icy Comet

https://ww2.mathworks.cn/matlabcentral/communitycontests/contests/6/entries/15262

function drawframe(f)% Icy cometpersistent frms
if f == 1% A problem with texturing a sphere is what to do about the poles. It is difficult
% to texture the [x, y, z] surface matrices created using the
% sphere command without getting significant anisotropy, pinching and/or
% discontinuities near the top and bottom.
%
% In this example a randomly sampled sphere will be generated, then uniform noise will be added,
% followed by smoothing using the the connectivity matrix relating adjacent points. The
% smoothing allows the noise distribution to be made more realistic and
% avoids the pole pinching artifacts & discontinuities.% % % Creating the comet nodes% Random sphere used here: replace with a fibonacci sphere for a different
% effect% Predictable
rng(7,'twister');% Number of vertices on Asteroid
n=5e4;% Randomly sampled sphere
g=randn(3,n);
p=g./vecnorm(g);% % % Determining connectivity between points
k=convhull(p');
c=@(x)sparse(k(:,x)*[1,1,1],k,1,n,n);                   
t=c(1)|c(2)|c(3);% % % Create the roughness penalizer
w=spdiags(-sum(t,2)+1,0,t*1.);              % t*1. is to convert t from logical to double% % % Random radial distance function to be penalized:
r=rand(n,1);% % % Solve for smoothed surface. Smoothing will be different for ice vs.% rock components.
s=(speye(n)+1e3*w'*w)\r-.43;
s2=(speye(n)+3e3*w'*w)\r-.4;        % Smoother for the ice component
s=s/mean(s);
s2=s2/mean(s2);% % % Apply surface to vertices for rock & ice components
p1 = p.*s';
p2 = p.*s2';% % % Plot.
T(1)=trisurf(k,p2(1,:),p2(2,:),p2(3,:),'FaceC', 'w', 'EdgeC', 'none','AmbientS',0,'DiffuseS',1,'SpecularS',0);
hold on;
T(2)=trisurf(k,p1(1,:),p1(2,:),p1(3,:), s,'EdgeC', 'none','AmbientS',0);
colormap(flipud(gray));
caxis([-1,1]*std(s)+1);
T(1).Parent.Parent.Position(3:4) = [1120, 840];% % % For looping
H=hgtransform('Parent',gca);
H2=hgtransform('Parent',gca);
set(T,'parent',H);% Add stars in the background
rd = rand(n,1);
C=scatter3(p(1,:)*50, p(2,:)*50, p(3,:)*50, rd*300, [1,1,1].*rd,'.');
set(C,'parent',H2);% % % pretty
axis equal off                                          % Pretty
set(gcf,'color','k');
camproj p
camva(6);
camtarget([0,0,0.3]);
light('position',[2,-3,10],'style','local');
light('position',[2,-3,10],'style','local','color',[1,1,1]*.3);ags = linspace(0, pi/3, 48);
for n = 1:48set(H, 'Matrix', makehgtform('xrotate',n/(16*pi)));set(H2, 'Matrix', makehgtform('zrotate',n/(16*pi)));camtarget([0,0,0.3]);campos([21*sin(ags(n)), -21*cos(ags(n)), 0]);frms{n}=getframe(gcf);
endcnt = 1;
close
endimage(frms{f}.cdata);axis equal off
camva(4.5);% S.D.G.
end

Nikolay Velkov / Energy

https://ww2.mathworks.cn/matlabcentral/communitycontests/contests/6/entries/16004

function drawframe(f)% This is Xor's AMAZING shader% https://www.shadertoy.com/view/cltfRf% Here is my translation to MATLABiRes = [800 450];
iTime = f/16;
persistent fragCoord
if isempty(fragCoord)[x,y]=meshgrid(1:iRes(1),iRes(2):-1:1);fragCoord = cat(3,x',y');
end
im4 = mainImage(fragCoord);
imr = imresize(im4, flip(iRes).*2, 'method', 'bilinear');
im = imshow(imr);function finalColor=mainImage( fragCoord )
finalColor = zeros(iRes(1), iRes(2), 3);
r = cat(3,iRes(1),iRes(2));for i = 0:0.01:1% Center and scale outwardp = (fragCoord.* 2 - r)./iRes(2).*i;% Compute zz = max(1 - vecnorm(p,2,3).^2, 0);% Sphere distortion p = p./(0.2 + sqrt(z).*0.3);% Offset for hex patternp(:,:,1) = p(:,:,1)./0.9 + iTime;p(:,:,2) = p(:,:,2) + mod(ceil(p(:,:,1))*0.5, 1) + iTime * 0.1625;% Mirror quadrantsv = abs((mod(p, 1))-0.5);% Add colorc = [2, 3, 5]./2e3;d1 =max(v(:,:,1).*1.5+ v(:,:,1), v(:,:,1).*2);d2 =max(v(:,:,1).*1.5+ v(:,:,2), v(:,:,2).*2);d3 =cat(3,d1,d2);for j = 1:3finalColor(:,:,j) = finalColor(:,:,j) + c(j).*z./(abs(d3(:,:,2) - 1) + 0.1 - i * 0.09);end
end
finalColor = tanh(finalColor.^2);
finalColor = permute(finalColor,[2 1 3]);
end
end

Lateef Adewale Kareem / Six-Linked Bars Mechanism

https://ww2.mathworks.cn/matlabcentral/communitycontests/contests/6/entries/15492

function drawframe(f)persistent L1 L2 L3 L4 L5 L6 L7 L8 t2 t3 t4 t5 t6 ...Bar2 Bar3 Bar4 Bar5 Bar6 f1 f2 if f==1L1=5;L2=2;L3=6;L4=4;L5=6;L6=4;L7=5;L8=1;f1=@(t2,t)(L2*cos(t2)-(L1+L4*cos(t)))^2+(L2*sin(t2)-L4*sin(t))^2-L3^2;f2=@(x5,y5,T)[x5+L5*cos(T(1))-(L1+L7+0.9*L6*cos(T(2)))y5+L5*sin(T(1))-(L8+0.9*L6*sin(T(2)))];t=linspace(0,2*pi,7); brown=[206,179,140]/255;s=sin(t);c=cos(t);R=1.15;wclr=0.7*[1,1,1];hold on;fill(R*c,R*s,wclr); fill(L1+R*c,R*s,wclr); fill((L1+L7)+R*c,L8+R*s,wclr);xline(0);yline(0);axis equalt4=acos(((L2+L3)^2-L1^2-L4^2)/(2*L1*L4));c4=cos(t4);s4=sin(t4);t2=asin(sin(t4*L4/(L2+L3)));c2=cos(t2);s2=sin(t2);x3=L2*c2;y3=L2*s2;t3=atan2(L4*s4-L2*s2,L1+L4*c4-L2*c2);x5=L2*c2+(2/3)*((L1+L4*c4)-L2*c2);y5=L2*s2+(2/3)*(L4*s4-L2*s2);t56=fsolve(@(T)f2(x5,y5,T),[1.5*pi;1.5*pi]);t5=t56(1);t6=t56(2);Bar2=BarMaker(L2,'g',0); Bar2.Rotate(t2);Bar3=BarMaker(L3,'b',[0,0.45]); Bar3.Rotate(t3);Bar3.Trans([x3,y3]);Bar4=BarMaker(L4,'g',0);Bar4.Rotate(t4);Bar4.Trans([L1,0]);Bar5=BarMaker(L5,brown,0.3); Bar5.Rotate(t5);Bar5.Trans([x5,y5]);Bar6=BarMaker(L6,'r',0); Bar6.Rotate(t6);Bar6.Trans([L1+L7,L8]);axis([-2.6,11.4,-5,5])elset2=t2+2*pi/48; c2=cos(t2);s2=sin(t2);x3=L2*c2;y3=L2*s2;t4=fzero(@(t)f1(t2,t),t4); c4=cos(t4);s4=sin(t4);t3=atan2(L4*s4-L2*s2,L1+L4*c4-L2*c2);x5=L2*c2+(2/3)*((L1+L4*c4)-L2*c2);y5=L2*s2+(2/3)*(L4*s4-L2*s2);t56=fsolve(@(T)f2(x5,y5,T),[t5;t6]); t5=t56(1);t6=t56(2);Bar2.Rotate(t2);  Bar3.Rotate(t3);Bar3.Trans([x3,y3]); Bar4.Rotate(t4);Bar5.Rotate(t5); Bar5.Trans([x5,y5]); Bar6.Rotate(t6);end
endfunction B=BarMaker(L,clr,F)t1=pi/2+linspace(0,pi); t2=t1+pi; s1=sin(t1);s2=sin(t2);c1=cos(t1);c2=cos(t2);Xl=[0.5*c1,L+0.5*c2];Yl=[0.5*s1,0.5*s2];X=Xl; Y=Yl;Xl=[Xl,Xl(1)]; Yl=[Yl,Yl(1)]; for n=1:numel(F)f=F(n);X=[X,f*L,f*L+0.3*[c1,c2],f*L];Y=[Y,0.5,0.3*[s1,s2],0.5];Xl=[Xl,nan,f*L+0.3*[c1,c2]];Yl=[Yl,nan,0.3*[s1,s2]];endax=gca;H=hgtransform('Parent',ax);K=hgtransform('Parent',H);B.line=plot(Xl,Yl,'k','Parent',K);B.fill=fill(X,Y,clr,'EdgeColor','none','Parent',K);B.Rotate=@(t)set(K,'Matrix',makehgtform('zrotate',t));B.Trans=@(p)set(H,'Matrix',makehgtform('translate',[p,0]));
end

本次活动圆满结束,想参加只能等明年了,可以在比赛页面蹲一下:

  • https://ww2.mathworks.cn/matlabcentral/contests.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/212596.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【Python】手把手教你用tkinter设计图书管理登录UI界面(三)

上一篇&#xff1a;【Python】手把手教你用tkinter设计图书管理登录UI界面&#xff08;二&#xff09;-CSDN博客 下一篇&#xff1a; 紧接上一篇文章&#xff0c;继续完善项目功能&#xff1a;用户登录。由于老王的注册部分有亿点点复杂&#xff0c;还没完成&#xff0c;但是…

鸿蒙OS应用开发的开发环境

鸿蒙OS应用开发的开发环境 鸿蒙系统发展越来越快&#xff0c;已经开始走进千家万户&#xff0c;从手机到电视机&#xff0c;再到汽车&#xff0c;以后各种手表、智能设备等等。这已经是一个广泛应用的操作系统&#xff0c;也是跟大家生活密切相关的操作系统。要想在这个平台上…

Kubernetes里的DNS;API资源对象ingress;Kubernetes调度;节点选择器NodeSelector;节点亲和性NodeAffinity

Kubernetes里的DNS K8s集群内有一个DNS服务&#xff1a; kubectl get svc -n kube-system |grep dns测试&#xff1a; 在tang3上安装bind-utils,目的是安装dig命令 yum install -y bind-utils apt install dnsutils #ubuntu上 解析外网域名 dig 10.15.0.10 www.baidu.com…

NSSCTF-Crypto靶场练习--第11-20题wp

文章目录 [SWPUCTF 2021 新生赛]traditional[LitCTF 2023]梦想是红色的 (初级)[SWPUCTF 2021 新生赛]crypto2[羊城杯 2021]Bigrsa[LitCTF 2023]Hex&#xff1f;Hex&#xff01;(初级)[SWPU 2020]happy[AFCTF 2018]BASE[安洵杯 2019]JustBase[鹤城杯 2021]Crazy_Rsa_Tech[SWPUCT…

我们常说的流应用到底是什么?

流应用是DCloud公司开发的一种可以让手机App安装包实现边用边下的技术。基于HTML5规范的即点即用应用&#xff0c;开发者按照HTML5规范开发的应用&#xff0c;可以在支持HTML5流应用的发行渠道实现即点即用的效果。 流应用是基于 HTML5规范的即点即用应用&#xff0c;开发者按照…

Nacos注册中心客户端容灾

目前Nacos客户端有一个FailoverReactor来进行容灾文件的管理&#xff0c;可以通过在指定磁盘文件里写入容灾数据来进行客户端使用数据的覆盖。FailoverReactor目前会拦截Nacos客户端查询接口调用&#xff0c;以getAllInstances接口为例&#xff0c;目前FailoverReactor的工作流…

【合集】SpringBoot——Spring,SpringBoot,SpringCloud相关的博客文章合集

前言 本篇博客是spring相关的博客文章合集&#xff0c;内容涵盖Spring&#xff0c;SpringBoot&#xff0c;SpringCloud相关的知识&#xff0c;包括了基础的内容&#xff0c;比如核心容器&#xff0c;springMVC&#xff0c;Data Access&#xff1b;也包括Spring进阶的相关知识&…

免费的网页数据抓取工具有哪些?【2024附下载链接】

在网络上&#xff0c;有许多网页数据抓取工具可供选择。本文将探讨其如何全网采集数据并支持指定网站抓取。我们将比较不同的数据采集工具&#xff0c;帮助您找到最适合您需求的工具。 网页数据抓取工具种类 在选择网页数据抓取工具之前&#xff0c;让我们先了解一下这些工具…

[ 蓝桥杯Web真题 ]-布局切换

目录 介绍 准备 目标 规定 思路 解法参考 介绍 经常用手机购物的同学或许见过这种功能&#xff0c;在浏览商品列表的时候&#xff0c;我们通过点击一个小小的按钮图标&#xff0c;就能快速将数据列表在大图&#xff08;通常是两列&#xff09;和列表两种布局间来回切换。…

电机:有刷直流电机的原理

一、什么是有刷直流电机 直流有刷电机&#xff08;Brushed DC Motor&#xff09;&#xff0c;定子是用永磁铁或者线圈做成&#xff0c;以形成固定磁场。在定子一端上有固定碳刷&#xff0c;或者铜刷&#xff0c;负责把外部电流引入转子线圈。而转子是由线圈构成&#xff0c;线…

邮件营销软件:10个创新邮件营销策略,提升投资回报率(一)

电子商务和电子邮件营销密不可分。尽管电子商务在蓬勃发展&#xff0c;而很多人对邮件营销颇有微词。但是在电子商务中&#xff0c;邮件营销的确是一种有效营销方式。在本文中&#xff0c;我们将讨论一下邮件营销在电子商务中的有效运用&#xff0c;帮助您的企业在今年尽可能地…

2023-12-05 Qt学习总结6

点击 <C 语言编程核心突破> 快速C语言入门 Qt学习总结 前言十八 QMessageBox消息对话框十九 Qt布局管理总结 前言 要解决问题: 学习qt最核心知识, 多一个都不学. 十八 QMessageBox消息对话框 QMessageBox消息对话框是Qt中的一个提供用户交互界面的对话框窗口。 它通常…

MyBatis 四大核心组件之 ParameterHandler 源码解析

&#x1f680; 作者主页&#xff1a; 有来技术 &#x1f525; 开源项目&#xff1a; youlai-mall &#x1f343; vue3-element-admin &#x1f343; youlai-boot &#x1f33a; 仓库主页&#xff1a; Gitee &#x1f4ab; Github &#x1f4ab; GitCode &#x1f496; 欢迎点赞…

【图片版】计算机组成原理考前复习题【第2章 运算方法和运算器-1】

目录 前言 考前复习题&#xff08;必记&#xff09; 结尾 前言 在计算机组成原理的学习过程中&#xff0c;我们深入探索了计算机系统概述这一重要领域。计算机系统作为现代科技的核心&#xff0c;是整个计算机科学的基石。我们将学到的知识与理论转化为了能够解决现实问题的…

Python+unittest+requests接口自动化测试框架搭建 完整的框架搭建过程

首先配置好开发环境&#xff0c;下载安装Python并下载安装pycharm&#xff0c;在pycharm中创建项目功能目录。如果不会的可以百度Google一下&#xff0c;该内容网上的讲解还是比较多比较全的&#xff01; 大家可以先简单了解下该项目的目录结构介绍&#xff0c;后面会针对每个文…

docker 可视化工具操作说明 portainer

官网地址 https://docs.portainer.io/start/install-ce/server/docker/linux 1.First, create the volume that Port docker volume create portainer_data2.下载并安装容器 docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restartalways -v /var/run/docker…

PWN动态调试

这篇文章就是来教大家学习怎么动态调试的&#xff0c;然后我还写了一篇关于动态调试的文章&#xff0c;不是buu上面的题&#xff0c;就是两道简单的栈溢出问题&#xff0c;那两道题挺有特点的。大家可以去看看。 每日3道PWN之课外2道&#xff08;第2.5天&#xff09;-CSDN博客 …

性能监控体系:InfluxDB Grafana Prometheus

InfluxDB 简介 什么是 InfluxDB &#xff1f; InfluxDB 是一个由 InfluxData 开发的&#xff0c;开源的时序型数据库。它由 Go 语言写成&#xff0c;着力于高性能地查询与存储时序型数据。 InfluxDB 被广泛应用于存储系统的监控数据、IoT 行业的实时数据等场景。 可配合 Te…

SSD基础架构与NAND IO并发问题探讨

在我们的日常生活中&#xff0c;我们经常会遇到一些“快如闪电”的事物&#xff1a;比如那场突如其来的雨、那个突然出现在你眼前的前任、还有就是今天我们要聊的——固态硬盘&#xff08;SSD&#xff09;。 如果你是一个技术宅&#xff0c;或者对速度有着近乎偏执的追求&…

【Qt开发流程】之容器类1:介绍及常用容器类和使用Java风格迭代器进行遍历

概述 Qt库提供了一组通用的基于模板的容器类。这些类可用于存储指定类型的项。例如&#xff0c;如果需要一个可调整大小的QString数组&#xff0c;可以使用QVector<QString>。 这些容器类被设计成比STL容器更轻、更安全、更易于使用。如果不熟悉STL&#xff0c;或者更喜…