Romantic Encounter - Cherry Blossom Rain in Pingba, Guizhou (realized by Matlab)

content

1 If I bloom, butterflies will come

2 My heart is rippling 

3 An impromptu poem

4 Matlab code implementation 


1 If I bloom, butterflies will come

Pingba Cherry Blossom Garden is located in the secondary water source protection area of ​​Hongfeng Lake in Pingba District, Anshun City, Guizhou Province. It is the largest cherry blossom garden in China. On the farm covering an area of ​​more than 24,000 mu, nearly 700,000 precious cherry blossoms are planted. Its wide area and high density can be called "the most in the world"! Guizhou Pingba Cherry Blossom has 6,000 cherry blossom planting bases. The cherry blossom forest grows around the Red Maple Lake. Every early spring, this place becomes a sea of ​​cherry blossoms, just like a paradise!

2 My heart is rippling 

In the spring breeze, clusters of cherry blossoms rippling in the spring breeze, swaying the graceful figure. The road is surrounded by cherry blossoms on both sides, and the road is covered with cherry blossom petals. Approaching the cherry blossom tree, petals fall one after another with the wind, and pink and white petals surround the perimeter, as if you were in a fairyland . A gust of spring breeze blows, you will smell the faint fragrance of flowers and the fragrance of the soil, and you can't help but admire this masterpiece of nature.

Topped the BBC for three consecutive years

At present, the cherry blossom base with the largest contiguous planting area in the world

Better than Taiwan, not lost to Japan, stunning the world

It is called "one of the most beautiful cherry blossom gardens" by foreign media!

3 An impromptu poem

         Pingba Cherry Blossoms

The spring breeze is like wine , and the peach blossoms bloom.

Spring is very colorful , and peach blossoms take up eight points .

No flower can play an indispensable role in the spiritual world and real life of the Chinese people like peach blossoms. It is a beautiful poem, a dense ink, a fragrant tea and wine, and a recluse for outsiders. Place……

4 Matlab code implementation 

function pingba
hold on,axis equal
axis(0.5+[-10,50,0,50])
set(gca,'xtick',[],'ytick',[],'xcolor','w','ycolor','w')
set(gca,'color',[0.5020    0.5020    0.5020])

length_trunk=6;
width_trunk=4;
k1=0.9;
k2=0.8;
number_branch=15;
alp=pi/10;
length_branch=k1*length_trunk;
width_branch=k2*width_trunk;
trunk=[12,0;12,length_trunk];
plot(trunk(:,1),trunk(:,2),'color',[0 0 0],'Linewidth',width_trunk)
begins=[trunk(2,:),pi/2,1];
grow=begins;
plotdata=[0 0 0 0 0 0 0 0];
plotdata(1,:)=[];
for i=1:number_branch
    control=randi(25,[length(grow(:,1)),1])>=10;
    ag=grow(:,3);
    l=length(ag);
    parta=[length_branch.*k1.^grow(:,4).*cos(ag+ones(l,1)*alp),length_branch.*k1.^grow(:,4).*sin(ag+ones(l,1)*alp),ones(l,1)*alp,ones(l,1)];
    partb=[length_branch.*k1.^grow(:,4).*cos(ag-ones(l,1)*alp),length_branch.*k1.^grow(:,4).*sin(ag-ones(l,1)*alp),-ones(l,1)*alp,ones(l,1)];
    parta2=[0.8.*length_branch.*k1.^grow(:,4).*cos(ag),0.8.*length_branch.*k1.^grow(:,4).*sin(ag),zeros(l,1),ones(l,1)];
    partb2=[0.8.*length_branch.*k1.^grow(:,4).*cos(ag),0.8.*length_branch.*k1.^grow(:,4).*sin(ag),zeros(l,1),ones(l,1)];
    parta=control.*parta+(1-control).*parta2;
    partb=control.*partb+(1-control).*partb2;
    parta=parta+grow;
    partb=partb+grow;
    congress=[parta;partb];
    grow=[grow;grow];
    judge=[grow,congress];
    judge=unique(judge,'rows');
    grow=judge(:,5:end);
    plotdata=[plotdata;judge];
end
for i=1:number_branch
    temp_w=width_branch*0.8^i;
    temp_branch=plotdata(plotdata(:,4)==i,:);
    plx=[temp_branch(:,1),temp_branch(:,5)];
    ply=[temp_branch(:,2),temp_branch(:,6)];
    plx=plx';ply=ply';
    plot(plx,ply,'color',[0 0 0]+i*[0.3020 0.3020 0.3020]./number_branch,'Linewidth',temp_w)
end

bloom_pos=plotdata(plotdata(:,8)==number_branch+1,[5,6]);
scatter(bloom_pos(:,1),bloom_pos(:,2),10,'CData',[0.8549    0.6824    0.6824])
bloom_pos=plotdata(plotdata(:,8)==number_branch,[5,6]);
scatter(bloom_pos(:,1),bloom_pos(:,2),8,'CData',[0.7451    0.5961    0.5961].*0.97)
end

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326938969&siteId=291194637