python畫動漫形象(魔法少女小圓曉美焰,super beautiful)

1.源代碼

import turtle as te
import time
WriteStep = 15 # 貝塞爾函數的取樣次數
Speed = 5
Width = 600 # 界面寬度
Height = 500 # 界面高度
Xh = 0 # 記錄前一個貝塞爾函數的手柄
Yh = 0
def Bezier(p1, p2, t): # 一階貝塞爾函數
return p1 * (1 - t) + p2 * t
def Bezier_2(x1, y1, x2, y2, x3, y3): # 二階貝塞爾函數
te.goto(x1, y1)
te.pendown()
for t in range(0, WriteStep + 1):
x = Bezier(Bezier(x1, x2, t / WriteStep),
Bezier(x2, x3, t / WriteStep), t / WriteStep)
y = Bezier(Bezier(y1, y2, t / WriteStep),
Bezier(y2, y3, t / WriteStep), t / WriteStep)
te.goto(x, y)
te.penup()
def Bezier_3(x1, y1, x2, y2, x3, y3, x4, y4): # 三階貝塞爾函數
x1 = -Width / 2 + x1
y1 = Height / 2 - y1
x2 = -Width / 2 + x2
y2 = Height / 2 - y2
x3 = -Width / 2 + x3
y3 = Height / 2 - y3
x4 = -Width / 2 + x4
y4 = Height / 2 - y4 # 坐標變換
te.goto(x1, y1)
te.pendown()
for t in range(0, WriteStep + 1):
x = Bezier(Bezier(Bezier(x1, x2, t / WriteStep), Bezier(x2, x3, t / WriteStep), t / WriteStep),
Bezier(Bezier(x2, x3, t / WriteStep), Bezier(x3, x4, t / WriteStep), t / WriteStep), t / WriteStep)
y = Bezier(Bezier(Bezier(y1, y2, t / WriteStep), Bezier(y2, y3, t / WriteStep), t / WriteStep),
Bezier(Bezier(y2, y3, t / WriteStep), Bezier(y3, y4, t / WriteStep), t / WriteStep), t / WriteStep)
te.goto(x, y)
te.penup()
def Moveto(x, y): # 移動到svg坐標下(x,y)
te.penup()
te.goto(-Width / 2 + x, Height / 2 - y)
def line(x1, y1, x2, y2): # 連接svg坐標下兩點
te.penup()
te.goto(-Width / 2 + x1, Height / 2 - y1)
te.pendown()
te.goto(-Width / 2 + x2, Height / 2 - y2)
te.penup()
def lineto(dx, dy): # 連接當前點和相對坐標(dx,dy)的點
te.pendown()
te.goto(te.xcor() + dx, te.ycor() - dy)
te.penup()
def Lineto(x, y): # 連接當前點和svg坐標下(x,y)
te.pendown()
te.goto(-Width / 2 + x, Height / 2 - y)
te.penup()
def Horizontal(x): # 做到svg坐標下橫坐標為x的水平線
te.pendown()
te.setx(x - Width / 2)
te.penup()
def horizontal(dx): # 做到相對橫坐標為dx的水平線
te.seth(0)
te.pendown()
te.fd(dx)
te.penup()
def vertical(dy): # 做到相對縱坐標為dy的垂直線
te.seth(-90)
te.pendown()
te.fd(dy)
te.penup()
te.seth(0)
def polyline(x1, y1, x2, y2, x3, y3): # 做svg坐標下的折線
te.penup()
te.goto(-Width / 2 + x1, Height / 2 - y1)
te.pendown()
te.goto(-Width / 2 + x2, Height / 2 - y2)
te.goto(-Width / 2 + x3, Height / 2 - y3)
te.penup()
def Curveto(x1, y1, x2, y2, x, y): # 三階貝塞爾曲線到(x,y)
te.penup()
X_now = te.xcor() + Width / 2
Y_now = Height / 2 - te.ycor()
Bezier_3(X_now, Y_now, x1, y1, x2, y2, x, y)
global Xh
global Yh
Xh = x - x2
Yh = y - y2
def curveto_r(x1, y1, x2, y2, x, y): # 三階貝塞爾曲線到相對坐標(x,y)
te.penup()
X_now = te.xcor() + Width / 2
Y_now = Height / 2 - te.ycor()
Bezier_3(X_now, Y_now, X_now + x1, Y_now + y1,
X_now + x2, Y_now + y2, X_now + x, Y_now + y)
global Xh
global Yh
Xh = x - x2
Yh = y - y2
def Smooth(x2, y2, x, y): # 平滑三階貝塞爾曲線到(x,y)
global Xh
global Yh
te.penup()
X_now = te.xcor() + Width / 2
Y_now = Height / 2 - te.ycor()
Bezier_3(X_now, Y_now, X_now + Xh, Y_now + Yh, x2, y2, x, y)
Xh = x - x2
Yh = y - y2
def smooth_r(x2, y2, x, y): # 平滑三階貝塞爾曲線到相對坐標(x,y)
global Xh
global Yh
te.penup()
X_now = te.xcor() + Width / 2
Y_now = Height / 2 - te.ycor()
Bezier_3(X_now, Y_now, X_now + Xh, Y_now + Yh,
X_now + x2, Y_now + y2, X_now + x, Y_now + y)
Xh = x - x2
Yh = y - y2
te.tracer(10)
te.setup(Width, Height, 0, 0)
te.pensize(1)
te.speed(Speed)
te.penup()
# 圖層_2
time.sleep(20)
te.color("black", "#F2F2F2") # 外套
Moveto(61, 462)
te.begin_fill()
smooth_r(12, -41, 27, -58)
curveto_r(-6, -36, 6, -118, 9, -132)
curveto_r(-15, -27, -23, -51, -26, -74)
curveto_r(4, -66, 38, -105, 65, -149)
Horizontal(486)
curveto_r(12, 24, 40, 99, 33, 114)
curveto_r(39, 82, 55, 129, 39, 144)
smooth_r(-31, 23, -39, 28)
smooth_r(-12, 37, -12, 37)
lineto(50, 92)
Horizontal(445)
smooth_r(-29, -38, -31, -46)
smooth_r(78, -107, 72, -119)
Smooth(355, 178, 340, 176)
Smooth(272, 63, 264, 64)
smooth_r(-29, 67, -27, 73)
Curveto(99, 292, 174, 428, 173, 439)
smooth_r(-8, 23, -8, 23)
Lineto(61, 462)
te.end_fill()
Moveto(60.5, 461.5) # 陰影
te.color("black", "#D3DFF0")
te.begin_fill()
curveto_r(0, 0, 17, -42, 27, -59)
curveto_r(-6, -33, 6, -128, 10, -133)
curveto_r(-15, -10, -27, -66, -27.285, -75)
te.pencolor("#D3DFF0")
curveto_r(12.285, 11, 82.963, 156, 82.963, 156)
te.pencolor("black")
smooth_r(12.322, 75, 19.322, 86)
curveto_r(-1, 11, -8, 25, -8, 25)
Horizontal(60.5)
te.end_fill()
Moveto(444.5, 464)
te.begin_fill()
curveto_r(0, 0, -29, -36, -31, -46)
smooth_r(53.59, -82.337, 53.59, -82.337)
te.pencolor("#D3DFF0")
smooth_r(86.41, -47.663, 96.072, -54.85)
Curveto(563.5, 297.5, 570.5, 299.5, 518.5, 334)
te.pencolor("black")
curveto_r(-2, 16, -12, 33, -12, 37)
smooth_r(50, 92, 50, 93)
Horizontal(444.5)
te.end_fill()
Moveto(195, 49)
te.begin_fill()
te.pencolor("#D3DFF0")
polyline(195, 49, 175.5, 106.5, 202.522, 49)
te.pencolor("black")
Horizontal(195)
te.pencolor("#D3DFF0")
te.end_fill()
Moveto(327.997, 49)
te.begin_fill()
te.pencolor("#D3DFF0")
curveto_r(0, 0, 11.503, 121.087, 13.503, 128.087)
curveto_r(11, 2, 54, 37, 54, 37)
lineto(-40, -165.087)
te.pencolor("black")
Horizontal(327.997)
te.pencolor("#D3DFF0")
te.end_fill()
te.pencolor("black")
line(94.5, 397.5, 107.5, 373.5) # 皺紋
line(122.5, 317.5, 95.875, 274.699)
line(122.5, 341.5, 141.5, 402.5)
line(141.5, 409.5, 153.5, 431.5)
# line(328,47.712,344,175.977)
line(340.023, 49, 360.5, 144)
# line(353.5,47.5,395.5,208.5)
line(478.5, 95.5, 518.5, 161.5)
line(518.5, 332.5, 460.5, 359.5)
polyline(506.5, 369.5, 493.5, 402.5, 502.5, 443.5)
Moveto(530, 429)
curveto_r(4, 16, -5, 33, -5, 33)
# 圖層_3
te.color("black", "#2b1d2a") # 外套內側
Moveto(225, 462)
te.begin_fill()
Horizontal(165)
smooth_r(9, -15, 8, -25)
curveto_r(-47, -126, 6, -212, 12, -225)
Curveto(185, 305, 202, 428, 225, 462)
Lineto(225, 462)
te.end_fill()
Moveto(390, 462)
te.begin_fill()
curveto_r(10, -23, 34, -180, 35, -222) # !!!227
curveto_r(7, 4, 54, 45, 61, 61) # 61
smooth_r(-73, 101, -72, 118)
curveto_r(5, 15, 31, 46, 31, 45)
Lineto(390, 462)
te.end_fill()
# 圖層_4
te.color("black", "#2b1d29") # 外套內側
Moveto(225, 462)
te.begin_fill()
curveto_r(-28, -50, -40, -166, -40, -250)
curveto_r(6, 51, -6, 87, 45, 106)
smooth_r(64, 27, 89, 24)
smooth_r(49, -18, 56, -20)
smooth_r(50, -10, 51, -85)
curveto_r(0, 29, -25, 201, -36, 225)
Lineto(225, 462)
te.end_fill()
# 圖層_5
te.color("black", "#3D3D3D") # 衣服
Moveto(225, 462)
te.begin_fill()
curveto_r(-5, -5, -22, -53, -23, -70)
lineto(32, -13)
curveto_r(3, -25, 6, -28, 12, -36)
smooth_r(13, -12, 16, -12)
vertical(-2)
curveto_r(45, 20, 64, 14, 94, 1)
vertical(2)
curveto_r(8, -2, 15, 2, 17, 4)
smooth_r(0, 6, -2, 9)
curveto_r(10, 10, 10, 29, 11, 33)
smooth_r(23, 4, 25, 6)
smooth_r(-17, 83, -17, 78)
Lineto(225, 462)
te.end_fill()
# 圖層_6
te.color("black", "#968281") # 脖子
Moveto(262, 329)
te.begin_fill()
vertical(17)
curveto_r(1, 2, 44, 14, 45, 15)
smooth_r(3, 12, 3, 12)
horizontal(3)
vertical(-5)
curveto_r(1, -3, 4, -6, 5, -7)
lineto(36, -14)
curveto_r(1, -1, 3, -16, 2, -17)
Curveto(318, 348, 296, 344, 262, 329)
te.end_fill()
# 圖層_8
te.color("black", "#E7F1FF") # 白色褶皺
Moveto(225, 462)
te.begin_fill()
lineto(-3, -5) # -3,-3,-3,-5
curveto_r(0, -2, 4, -4, 5, -6)
smooth_r(16, 3, 19, -8)
smooth_r(0, -7, 0, -11)
smooth_r(5, -8, 9, -5)
smooth_r(19, -8, 19, -11)
smooth_r(6, -7, 6, -7)
smooth_r(7, -2, 9, -4)
lineto(41, -2)
lineto(12, 9)
smooth_r(3, 15, 7, 18)
smooth_r(15, 4, 17, 4)
smooth_r(4, -4, 6, -4)
smooth_r(6, 4, 5, 9)
smooth_r(0, 9, 0, 9)
smooth_r(1, 7, 7, 6)
smooth_r(8, 0, 8, 0)
lineto(-2, 8)
Lineto(225, 462)
te.end_fill()
te.pensize(2)
Moveto(240, 450)
smooth_r(0, 9, 3, 12)
Moveto(372, 462)
curveto_r(-2, -4, -5, -29, -7, -28)
te.pensize(1)
# 圖層_7
te.color("black", "#A2B8D6") # 衣領
Moveto(262, 331)
te.begin_fill()
curveto_r(0, 8, -1, 13, 0, 15)
smooth_r(43, 14, 45, 15)
lineto(3, 12)
horizontal(3)
smooth_r(-1, -3, 0, -5)
lineto(5, -7)
lineto(36, -14)
curveto_r(1, -1, 2, -12, 2, -15)
smooth_r(25, -2, 15, 13)
curveto_r(-2, 4, -7, 29, -7, 32)
smooth_r(-35, 19, -41, 22)
smooth_r(-9, 14, -12, 14)
smooth_r(-7, -12, -14, -15)
curveto_r(-19, -2, -41, -25, -41, -25)
smooth_r(-10, -26, -10, -30)
Smooth(255, 332, 262, 331)
te.end_fill()
Moveto(262, 346)
lineto(-12, -6)
Moveto(369, 333)
curveto_r(2, 4, -6, 10, -15, 14)
# 圖層_9
te.color("black", "#151515") # 領結
Moveto(247, 358)
te.begin_fill()
curveto_r(-5, 3, -8, 20, -6, 23)
curveto_r(25, 21, 50, 17, 50, 17)
lineto(-23, 64)
horizontal(22)
smooth_r(1, -13, 2, -16)
lineto(13, -50)
curveto_r(2, 2, 7, 3, 10, 1)
smooth_r(18, 65, 18, 65)
horizontal(19)
lineto(-24, -65)
curveto_r(21, 5, 39, -10, 44, -13)
curveto_r(5, -20, 1, -21, 0, -24)
curveto_r(-18, -2, -49, 15, -52, 17)
smooth_r(-11, -3, -15, -1)
Smooth(252, 356, 247, 358)
te.end_fill()
# 圖層_10
te.color("black", "#A2B8D6") # 衣領(透過領結)
Moveto(297, 387)
te.begin_fill()
lineto(-11, 6)
curveto_r(-1, 0, -20, -7, -30, -19)
Curveto(259, 373, 297, 385, 297, 387)
te.end_fill()
Moveto(323, 384)
te.begin_fill()
lineto(8, 7)
lineto(30, -14)
curveto_r(1, -1, 5, -6, 4, -7)
Smooth(329, 379, 323, 384)
te.end_fill()
# 圖層_11
te.color("black", "#F3EEEB") # 臉
Moveto(185, 212)
te.begin_fill()
curveto_r(4, -9, 46, -77, 52, -75)
curveto_r(-2, -17, 19, -68, 27, -73)
curveto_r(16, 15, 71, 108, 76, 112)
smooth_r(76, 53, 86, 60)
curveto_r(0, 65, -27, 75, -31, 76)
curveto_r(-50, 28, -70, 30, -85, 30)
smooth_r(-77, -22, -86, -26)
Curveto(180, 302, 186, 228, 185, 212)
te.end_fill()
# 圖層_12
te.color("black", "#2B1D29") # 頭發
Moveto(189, 202)
te.begin_fill()
curveto_r(-1, 22, 19, 51, 19, 51)
smooth_r(-10, -42, 7, -92)
Curveto(212, 168, 196, 189, 189, 202)
te.end_fill()
Moveto(221, 155)
te.begin_fill()
curveto_r(-2, 6, 5, 48, 5, 48)
smooth_r(18, -28, 20, -48)
curveto_r(-5, 24, 4, 43, 7, 50)
curveto_r(-10, -49, 3, -72, 13, -106)
curveto_r(-2, -7, -3, -32, -3, -35)
curveto_r(-17, 18, -27, 71, -27, 71)
Lineto(221, 155)
te.end_fill()
Moveto(264, 64)
te.begin_fill()
curveto_r(-4, 5, 14, 100, 14, 100)
smooth_r(-6, -79, -5, -85)
curveto_r(0, 98, 49, 139, 49, 139)
smooth_r(8, -50, 3, -65)
Smooth(272, 64, 264, 64)
te.end_fill()
Moveto(342, 176)
te.begin_fill()
curveto_r(-1, 27, -10, 57, -10, 57)
smooth_r(20, -33, 17, -54)
Lineto(342, 176)
te.end_fill()
te.penup()
te.begin_fill()
polyline(349, 180, 353, 203, 361, 203)
polyline(361, 203, 362, 188, 349, 180)
te.end_fill()
# 圖層_13
te.pensize(2)
Moveto(210, 180) # 眉毛
curveto_r(5, -4, 63, 9, 63, 14)
Moveto(338, 193)
curveto_r(0, -3, 18, -6, 18, -6)
te.pensize(1)
# 圖層_14
te.color("black", "#D1D1D1") # 眼睛1
te.pensize(2)
Moveto(206, 212)
te.begin_fill()
lineto(15, -7)
curveto_r(4, -1, 26, -2, 30, 0)
smooth_r(10, 3, 12, 7)
te.pencolor("#D1D1D1")
te.pensize(1)
smooth_r(2, 27, -1, 30)
smooth_r(-39, 5, -44, 1)
Smooth(206, 212, 206, 212)
te.end_fill()
Moveto(384, 204)
te.begin_fill()
te.pencolor("black")
te.pensize(2)
curveto_r(-3, -1, -18, -1, -28, 1)
smooth_r(-9, 6, -10, 9)
te.pencolor("#D1D1D1")
te.pensize(1)
smooth_r(3, 18, 6, 23)
smooth_r(38, 6, 40, 4)
smooth_r(10, -9, 13, -22)
te.pencolor("black")
te.pensize(2)
Lineto(384, 204)
te.end_fill()
# 圖層_15
te.color("#0C1631", "#0C1631") # 眼睛2
te.pensize(1)
Moveto(216, 206)
te.begin_fill()
curveto_r(-1, 5, 0, 26, 7, 35)
smooth_r(30, 2, 33, 0)
smooth_r(5, -31, 2, -34)
Smooth(219, 203, 216, 206)
te.end_fill()
Moveto(354, 207)
te.begin_fill()
curveto_r(-2, 1, 2, 29, 4, 31)
smooth_r(30, 3, 33, 1)
smooth_r(6, -24, 4, -27)
lineto(-11, -8)
Curveto(382, 204, 357, 206, 354, 207)
te.end_fill()
# 圖層_17
te.color("#F5F5F5", "#F5F5F5") # 眼睛3
Moveto(253, 211)
te.begin_fill()
curveto_r(-3, 0, -8, 8, 1, 10)
Smooth(258, 210, 253, 211)
te.end_fill()
Moveto(392, 209)
te.begin_fill()
lineto(4, 3)
vertical(4)
lineto(-4, 2)
Curveto(386, 214, 392, 209, 392, 209)
te.end_fill()
# 圖層_18
te.color("#352F53", "#352F53") # 眼睛4
Moveto(219, 229)
te.begin_fill()
smooth_r(2, -5, 6, -4)
smooth_r(18, 13, 27, 1)
curveto_r(3, 0, 5, 3, 5, 3)
vertical(13)
Horizontal(224)
Lineto(219, 229)
te.end_fill()
Moveto(357, 227)
te.begin_fill()
smooth_r(4, -6, 10, -2)
smooth_r(10, 13, 19, 1)
curveto_r(6, 0, 8, 6, 8, 6)
lineto(-2, 9)
curveto_r(-12, 3, -29, 0, -32, -2)
Smooth(357, 227, 357, 227)
te.end_fill()
# 圖層_19
te.color("#9A90CB", "#9A90CB") # 眼睛5
Moveto(227, 231)
te.begin_fill()
curveto_r(-6, 0, -5, 5, -3, 8)
smooth_r(24, 2, 27, 0)
smooth_r(0, -8, -1, -8)
Smooth(234, 231, 227, 231)
te.end_fill()
Moveto(361, 227)
te.begin_fill()
curveto_r(2, 18, 26, 14, 30, 6)
smooth_r(-1, -3, -2, -4)
smooth_r(-15, 9, -24, -4)
Curveto(363, 224, 361, 225, 361, 227)
te.end_fill()
# 圖層_16
te.pencolor("black") # 眼睛(線條)
te.pensize(3)
# Moveto(206,213)
# lineto(14,-8)
# curveto_r(3,-1,30,0,33,1)
# lineto(10,6)
Moveto(225, 215)
curveto_r(10, 28, 22, 16, 24, 6)
Moveto(365, 219)
curveto_r(4, 14, 18, 24, 22, -3)
te.pensize(2)
line(240.5, 207.5, 227.5, 211.5)
line(245.5, 209.5, 227.5, 214.5)
line(247.5, 211.5, 227.5, 217.5)
line(247.5, 214.5, 229.5, 220.5)
line(247.5, 218.5, 230.5, 223.5)
line(246.5, 222.5, 232.5, 226.5)
line(244.5, 225.5, 234.5, 228.5)
line(377.5, 207.5, 367.5, 210.5)
line(384.5, 207.5, 366.5, 212.5)
line(385.5, 210.5, 366.5, 215.5)
line(384.5, 213.5, 366.5, 218.5)
line(384.5, 215.5, 367.5, 220.5)
line(384.5, 218.5, 368.5, 223.5)
# line(383.5,220.5,368.5,225.5)
line(382.5, 223.5, 370.5, 227.5)
# line(381.5,226.5,373.5,229.5)
# 圖層_20
te.pencolor("black")
Moveto(309, 270) # 鼻子、嘴
curveto_r(0, 0, 4, 7, 1, 9)
line(296.5, 307.5, 303.5, 307.5)
Moveto(315, 307)
smooth_r(10, -1, 10, 2)
te.penup()
te.hideturtle()
te.update()
te.done()
溫馨提示:把第154行注釋掉就可以了,這是一個等待,不是卡了time.sleep(20)
繪畫速度可以在第三行調整,數字越大,畫得越慢WriteStep = 15# 貝塞爾函數的取樣次數

2.運行截圖

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/211718.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/211718.shtml
英文地址,請注明出處:http://en.pswp.cn/news/211718.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

stu06-VSCode里的常用快捷鍵

Alt Z:文字自動換行。當一行的文字太長時,可以使用。或者查看→自動換行Alt Shift ↓ :快速復制當前行到下一行Alt Shift ↑ :快速復制當前行到上一行Alt B:在默認瀏覽器中打開當前.html文件Ctrl Enter&#xf…

深入學習之anaconda、pytorch、cuda安裝

文章目錄 1. 安裝CUDA與CUDNN2. Anaconda安裝PyTorch3. notebook添加自己創建的環境4. Anaconda安裝相關的庫5. GPU測試 1. 安裝CUDA與CUDNN csdn大佬安裝步驟 【CUDA】cuda安裝 (windows版) 查看此電腦的CUDA版本配置 自己電腦上GPU使用的詳細參數 n…

端口復用和重映射

一、端口復用 (1)端口復用概念 端口復用是將一個I/O賦予多個功能,通過設置I/O的工作模式來切換不同的功能。 STM32有很多的內置外設,這些外設的外部引腳都是與GPIO復用的。也就是說,一個GPIO如果可以復用為內置外設的…

《PySpark大數據分析實戰》圖書上線啦

《PySpark大數據分析實戰》圖書上線啦 《PySpark大數據分析實戰》圖書上線啦特殊的日子關于創作關于數據關于Spark關于PySpark關于圖書/專欄 《PySpark大數據分析實戰》圖書上線啦 特殊的日子 不知不覺一轉眼入駐CSDN已經滿一年了,這真是一個充滿意義的特殊的日子&…

Linux命令詳解./configure、make、make install 命令學習

文章來自Linux命令詳解./configure、make、make install 命令-CSDN博客 文章目錄 1 編譯安裝命令詳解 1.1 簡介 1.2 詳細解釋 1.2.1 configure命令 1.2.2 make 1.2.3 make insatll 1.2.4 configure和make中的DESTDIR和PREFIX區別 1.2.4.1 configure中的PREFIX 1.2.4.2 make ins…

sfp8472學習CDR

1,cdr名稱解釋 因為光信號傳輸至一定距離的時候,通常是長距離傳輸,其波形會出現一定程度的失真,接收端接收到的信號是一個個長短不一的脈沖信號,這個時候在接收端,我們就無法得到我們需要的數據。所以,這個時候就需要有信號的再生,信號的再生功能為再放大、再整形和再…

[足式機器人]Part2 Dr. CAN學習筆記-自動控制原理Ch1-2穩定性分析Stability

本文僅供學習使用 本文參考: B站:DR_CAN Dr. CAN學習筆記-自動控制原理Ch1-2穩定性分析Stability 0. 序言1. 穩定的分類2. 穩定的對象3. 穩定的系統4. 系統穩定性的討論5. 補充內容——Transfer Function(傳遞函數) - nonzero Initial Condition(非零初始…

高防IP防御效果怎么樣,和VPN有區別嗎

高防IP主要是用于防御網絡攻擊,可以抵御各種類型的DDoS攻擊,隱藏源IP地址,提高網絡安全性和用戶體驗。主要目的是解決外部網絡攻擊問題,保護網絡安全,避免因攻擊而導致的業務中斷和數據泄露等問題。 而VPN則是一種可以…

ubuntu20 安裝docker

一.官網安裝文檔 (基本按官方文檔安裝) Install Docker Engine on Ubuntu | Docker Docs 二.安裝步驟 1.docker 需要64位操作系統、linux內核要在3.1以上 #uname -r 2.卸載可能存在的舊版本 #sudo apt-get remove docker docker-engine docker-ce …

《Mamba: Linear-Time Sequence Modeling with Selective State Spaces》閱讀筆記

論文標題 《Mamba: Linear-Time Sequence Modeling with Selective State Spaces》 作者 Albert Gu 和 Tri Dao 初讀 摘要 Transformer 架構及其核心注意力模塊 地位:目前深度學習領域普遍的基礎模型。 為了解決 Transformers 在長序列上的計算效率低下的問題…

【193】Java8調用POI 5.2.5生成帶圖片的Excel文件

本文假定 Excel 文件中保存的是員工數據,并且數據中帶有員工的頭像。代碼支持的圖片格式有png、bmp、jpg、gif。但是這里需要注意,有些網站上下載的圖片雖然后綴名是 jpg,但是文件二進制內容的格式是 WebP 的。Java8 目前官方api不支持 WebP …

【代碼隨想錄算法訓練營-第四天】【鏈表】24,19, 面試題 02.07,142

24. 兩兩交換鏈表中的節點 第一遍-遞歸-小看了一下題解 思路: 讀了兩遍題目才理解…相鄰節點的交換,這個操作很容易實現,但需要一個tmpNode因為是鏈表的題目,沒開始思考之前先加了dummyNode,還真管用把dummyNode作為…

空氣質量數據和氣象數據

1、北京、上海、廣州的空氣質量數據和氣象數據 要素如下: 逐日數據 時間跨度:2014.1.1-2022.3.31,共3012條數據 數據質量:98% 城市:只有北京、上海、廣州 可以用作論文數據 數據來源:中國環境監測總站…

23. 合并 K 個升序鏈表 --力扣 --JAVA

題目 給你一個鏈表數組,每個鏈表都已經按升序排列。 請你將所有鏈表合并到一個升序鏈表中,返回合并后的鏈表。 解題思路 對每個鏈表的首節點進行比較,獲取當前的最小節點;將每個階段的最小節點進行鏈接; 代碼展示 c…

亞馬遜云科技re_Invent 2023產品體驗:亞馬遜云科技產品應用實踐 國賽選手帶你看Elasticache Serverless

拋磚引玉 講一下作者背景,曾經參加過國內世界技能大賽云計算的選拔,那么在競賽中包含兩類,一類是架構類競賽,另一類就是TroubleShooting競賽,對應的分別為AWS GameDay和AWS Jam,想必也有朋友玩過此類競賽&…

4.權限特權轉移代碼

核心文件用戶文件引導文件 核心文件 ;------------------------新增--------------------------------; 本文件涉及了權限, 將使用調用門描述符來處理 低權限到高權限的轉移;------------------------權限---------------------------- ;此文件延用上個CORE.asm. 并做出一些修…

[linux] 解壓縮xz

在Linux命令行中解壓縮.xz文件,你可以使用以下幾種方法: 使用unxz工具: unxz filename.xz 這個命令會將filename.xz解壓縮為一個同名的未壓縮文件。如果原文件有其他的擴展名(如.tar.xz),那么這個擴展名會被…

關于洛谷P1007最快的方法

P1007 獨木橋 - 洛谷 | 計算機科學教育新生態 (luogu.com.cn) 題目背景 戰爭已經進入到緊要時間。你是運輸小隊長,正在率領運輸部隊向前線運送物資。運輸任務像做題一樣的無聊。你希望找些刺激,于是命令你的士兵們到前方的一座獨木橋上欣賞風景&#xf…

智能儀表板DevExpress Dashboard v23.1 - 支持自定義樣式創建

使用DevExpress Analytics Dashboard,再選擇合適的UI元素(圖表、數據透視表、數據卡、計量器、地圖和網格),刪除相應參數、值和序列的數據字段,就可以輕松地為執行主管和商業用戶創建有洞察力、信息豐富的、跨平臺和設…

STM32 配置TIM定時中斷常用庫函數

單片機學習! 目錄 ?編輯 1. 函數TIM_DeInit 2. 函數TIM_TimeBaseInit 配置時基單元 3. 函數TIM_TimeBaseStructInit 4. 函數TIM_Cmd 運行控制 5. 函數TIM_ITConfig 中斷輸出控制 6. 時基單元的時鐘選擇函數 6.1 函數TIM_InternalClockConfig 6.2 函數 TIM…