CLGO语言正式更名“酷语言”,是一种批处理寄生脚本,帮助批处理实现多彩的绘图功能。随着酷语言社区的不断壮大,开发者日渐增多。本次收集了一些酷语言社区开发者的作品(也包含本人的作品)供大家赏析。打包下载
链接: https://pan.baidu.com/s/1GvIaTNmFGIplbHKDR8GEgw?pwd=jsrp
1.灰色时钟- ::*****************************************************************************
- @ECHO OFF&MODE CON COLS=100 LINES=30&CLGO "%~F0"&PAUSE>NUL&EXIT /B
- ::*****************************************************************************
-
- TO DIAL
- MAKE :PENW=2 :PENC=8
- REPEAT 60
- [
- MAKE :PENC=8
- PU
- FD 130
- PD
- FD 10
- BK 140
- RT 6
- ]
-
- MAKE :PENW=3
- REPEAT 12
- [
- PU
- FD 115
- PD
- FD 25
- BK 140
- RT 30
- ]
-
- MAKE :PENW=2
- REPEAT 60
- [
- MAKE :PENC=8
- PU
- FD 80
- PD
- FD 20
- BK 100
- RT 6
- ]
-
- TO HOUR___HAND :ANGEL :LEN
- MINUTE_HAND :ANGEL :LEN
-
- TO MINUTE_HAND :ANGEL :LEN
- MAKE :PENC=8 :PENW=4
- RT :ANGEL
- FD :LEN
- HM
-
- TO SECOND_HAND :ANGEL :LEN
- MAKE :PENC=6 :PENW=3
- RT :ANGEL
- FD :LEN
- HM
-
- TO MAIN
- MAKE :PENS=2
- DIAL
- MAKE :PENC=8 :PENW=6
- OVAL 139 139 0
- MAKE :PENC=8 :PENW=3
- OVAL 100 100 0
- MAKE :PENC=8
- OVAL 80 80 0
- MAKE :PENC=4
- OVAL 3 3 0
- MEMUSE
- WHILE
- [
- HOUR___HAND (TIME(3)+TIME(4)/60)*30 60
- MINUTE_HAND (TIME(4)+TIME(5)/60)*6 80
- SECOND_HAND (TIME(5)*6) 110
- TEXT 24 0 15 微软雅黑 {TIME(3)}时{TIME(4)}分{TIME(5)}秒
- MEMSEE
- WAIT 1000
- ]
- MEMOUT
复制代码 2.蝴蝶曲线- ::*****************************************************************************
- @ECHO OFF&MODE CON COLS=100 LINES=30&CLGO "%~F0"&PAUSE>NUL&EXIT /B
- ::*****************************************************************************
-
- TO MAIN
- MAKE :PENS=2 :PENW=13 :PENC=4
- FOR ::T 0 3600
- IF ::T%360=0
- MAKE :PENC=RAND(15)+1
- ]
- MAKE :PEN0=(EXP(COS(DEG(::T)))-2*COS(DEG(4*::T))+(SIN(DEG(::T/12)))^5)*70
- SETXY :PEN0*COS(DEG(::T)) :PEN0*SIN(DEG(::T))
- ]
复制代码 3.转动的鸡蛋- ::*****************************************************************************
- @ECHO OFF&MODE CON COLS=100 LINES=30&CLGO "%~F0"&PAUSE>NUL&EXIT /B
- ::*****************************************************************************
-
- TO TC :A :B :K :XX :YY :Z :W :R
- MAKE :PENX=:A*(COS(0))*(COS(DEG(:Z)))-(:B*(SIN(0))/(1-:K*(SIN(0))))*(SIN(DEG(:Z)))+:XX
- MAKE :PENY=:A*(COS(0))*(SIN(DEG(:Z)))+(:B*(SIN(0))/(1-:K*(SIN(0))))*(COS(DEG(:Z)))+:YY
- FOR ::I 0 360
- SETXY :A*(COS(DEG(::I)))*(COS(DEG(:Z)))-(:B*(SIN(DEG(::I)))/(1-:K*(SIN(DEG(::I)))))*(SIN(DEG(:Z)))+:XX :A*(COS(DEG(::I)))*(SIN(DEG(:Z)))+(:B*(SIN(DEG(::I)))/(1-:K*(SIN(DEG(::I)))))*(COS(DEG(:Z)))+:YY
- MAKE :PENX=:A*(COS(DEG(::I)))*(COS(DEG(:Z)))-(:B*(SIN(DEG(::I)))/(1-:K*(SIN(DEG(::I)))))*(SIN(DEG(:Z)))+:XX
- MAKE :PENY=:A*(COS(DEG(::I)))*(SIN(DEG(:Z)))+(:B*(SIN(DEG(::I)))/(1-:K*(SIN(DEG(::I)))))*(COS(DEG(:Z)))+:YY
- IF :W=::I
- FOR ::J 1 :R
- OVAL ::J ::J 0
- ]
- ]
- IF :W=360-::I
- FOR ::J 1 :R
- OVAL ::J ::J 0
- ]
- ]
- IF :W=2*::I
- FOR ::J 1 :R
- OVAL ::J ::J 0
- ]
- ]
- ]
-
- TO MAIN
- MAKE :PENS=4 :PENW=2
- MEMUSE
- FOR ::K 0 360
- MAKE :PENC=RAND(3)+3
- TC 100 130 0.4 0 0 ::K ::K 10
- MEMSEE
- WAIT 20
- ]
复制代码 4.渐进斜椭圆- ::*****************************************************************************
- @ECHO OFF&MODE CON COLS=100 LINES=30&CLGO "%~F0"&PAUSE>NUL&EXIT /B
- ::*****************************************************************************
-
- //绘制斜椭圆过程
- TO OBLIQUE_ELLIPSES :A :B :X :Y :Z :J
- PU
- SETXY :A*(COS(0))*(COS(DEG(:Z)))-:B*(SIN(0))*(SIN(DEG(:Z)))+:X :A*(COS(0))*(SIN(DEG(:Z)))+:B*(SIN(0))*(COS(DEG(:Z)))+:Y
- PD
- FOR ::T 0 360
- [
- SETXY :A*(COS(DEG(::T)))*(COS(DEG(:Z)))-:B*(SIN(DEG(::T)))*(SIN(DEG(:Z)))+:X :A*(COS(DEG(::T)))*(SIN(DEG(:Z)))+:B*(SIN(DEG(::T)))*(COS(DEG(:Z)))+:Y
- ]:J
-
- //斜椭圆渐变主过程
- TO MAIN
- MAKE :PENS=2 :PENW=2 :PENC=5
- MEMUSE
- FOR ::A 360 1
- [
- OBLIQUE_ELLIPSES 300 100 0 0 10 ::A
- OBLIQUE_ELLIPSES 200 200 0 0 120 ::A
- MEMSEE
- ](-1)
- MEMOUT
复制代码 5.患有帕金森综合征的线- ::*****************************************************************************
- @ECHO OFF&MODE CON COLS=100 LINES=30&CLGO "%~F0"&PAUSE>NUL&EXIT /B
- ::*****************************************************************************
-
- TO TEST :X1 :Y1 :X2 :Y2
- MAKE :PENS=2 :PENW=2 :PENC=4 :PENC=5
- MEMUSE
- MAKE :X1=-100 :Y1=-120 :X2=100 :Y2=-90
- FOR ::I 1 30
- REPEAT 15
- MAKE :PENX=:X1 :PENY=:Y1+(RAND(20))
- SETXY :X2 :Y2
- MAKE :PENX=:X2 :PENY=:Y2
- SETXY :X1 :Y1+20
- MAKE :PENX=:X1 :PENY=:Y1+20
- SETXY :X2 :Y2+(RAND(20))
- MEMSEE
- MAKE :Y1=:Y1+1
- ]
- REPEAT 15
- MAKE :PENX=:X1 :PENY=:Y1+(RAND(20))
- SETXY :X2 :Y2
- MAKE :PENX=:X2 :PENY=:Y2
- SETXY :X1 :Y1+20
- MAKE :PENX=:X1 :PENY=:Y1+20
- SETXY :X2 :Y2+(RAND(20))
- WAIT 10
- MEMSEE
- MAKE :Y2=:Y2+1
- ]
- ]
- MEMSEE
- MEMOUT
-
- TO MAIN
- TEST -100 -100 100 -100
复制代码 6.正方形递归- ::*****************************************************************************
- @ECHO OFF&MODE CON COLS=100 LINES=30&CLGO "%~F0"&PAUSE>NUL&EXIT /B
- ::*****************************************************************************
-
- TO CYCL :START :ENDPS :STEPS
- FOR ::I :START :ENDPS
- MAKE :PENC=RAND(15)+1
- OVAL ::I/3 ::I ::I
- ]RAND(12)
-
- TO SQRE :START :ENDPS :STEPS
- FOR ::I :START :ENDPS
- MAKE :PENC=RAND(15)+1
- RECT ::I/3 ::I ::I
- ]RAND(12)
-
- TO MAIN
- MAKE :PENS=4 :PENW=1.2
- CYCL 10 300 3
- SQRE 10 300 3
- MAKE :PENX=-300 :PENY=200
- TEXT 22 3 7 微软雅黑 正方形递归
复制代码 7.银河系的震颤- ::*****************************************************************************
- @ECHO OFF&MODE CON COLS=100 LINES=30&CLGO "%~F0"&PAUSE>NUL&EXIT /B
- ::*****************************************************************************
-
- TO CYCL :START :ENDPS :STEPS
- FOR ::I :START :ENDPS
- MAKE :PENC=RAND(15)+1
- OVAL ::I/(RAND(15)+1) ::I ::I
- ](-1)*(RAND(5))
-
- TO SQRE :START :ENDPS :STEPS
- FOR ::I :START :ENDPS
- MAKE :PENC=RAND(15)+1
- RECT ::I/(RAND(15)+1) ::I ::I
- ](-1)*(RAND(5))
-
- TO MAIN
- MAKE :PENS=2 :PENW=1.3
- REPEAT 10000
- MEMUSE
- CYCL 200 100 3
- MEMSEE
- ]
复制代码 8.仙女散花- ::*****************************************************************************
- @ECHO OFF&MODE CON COLS=100 LINES=30&CLGO "%~F0"&PAUSE>NUL&EXIT /B
- ::*****************************************************************************
- TO FUNCTIONS_IMG :A
- MEMUSE
- FOR ::A 1 360*3
- MAKE :PENX=-1 :PENY=0
- ROTE ::A
- MEMSEE
- ]:A
- MEMOUT
-
- TO MORNING_GLORY
- REPEAT 12
- [
- MAKE :PENC=RAND(15)+1
- REPEAT 25
- [
- FD 100
- BK 100
- RT 2
- ]
- FD 35
- ]
-
- TO MAIN
- MAKE :PENS=4 :PENW=1.6 :PENX=-36 :PENY=126
- MORNING_GLORY
- FUNCTIONS_IMG 30
- REPEAT 30
- MAKE :PENX=RAND(800)-400 :PENY=RAND(500)-300
- MORNING_GLORY
- ]
复制代码 9.烟花- ::*****************************************************************************
- @ECHO OFF&MODE CON COLS=100 LINES=30&CLGO "%~F0"&PAUSE>NUL&EXIT /B
- ::*****************************************************************************
-
- TO FIRST :X :Y :W :C :A :循环 :旋转角度
- REPEAT 20 [
- MAKE :PENX=RAND(:X)
- MAKE :PENY=RAND(:Y)
- MAKE :PENW=RAND(:W)
- MAKE :PENC=RAND(:C)
- MAKE :HEADING=RAND(:A)
- MAKE :旋转角度=RAND(:旋转角度)
- REPEAT 100 [
- MAKE :循环=:循环+10
- PD
- FD :循环
- PU
- BK :循环
- LT :旋转角度
- WAIT 1
- ]
- ]
-
- TO MAIN
- FIRST 150 100 3 15 180 0 30
复制代码 10.运动员(这也是最有趣的一个,来自一位酷语言编程高手的贡献)- ::*****************************************************************************
- @ECHO OFF&COLOR 0F&MODE CON COLS=200 LINES=45&CLGO "%~F0"&PAUSE>NUL&EXIT /B
- ::*****************************************************************************
-
- TO 头 :x :y :r :z臂 :z臂r :y臂 :y臂r :z腕 :z腕r :y腕 :y腕r :z腿 :z腿r :y腿 :y腿r :zx腿 :zx腿r :yx腿 :yx腿r
- make :penx=:penx+:x :peny=:peny+:y :heading=:heading+:r
- OVAL 10 10 0
- OVAL 6 6 0
- OVAL 2 2 0
- rt 180
- fd 80
- make :r=:heading :x=:penx :y=:peny :penc=1
- 左臂 :z臂 :z臂r :z腕 :z腕r
- make :heading=:r :penx=:x :peny=:y :penc=:penc+1
- 右臂 :y臂 :y臂r :y腕 :y腕r
- make :heading=:r :penx=:x :peny=:y :penc=:penc+1
- 左大腿 :z腿 :z腿r :zx腿 :zx腿r
- make :heading=:r :penx=:x :peny=:y :penc=:penc+1
- 右大腿 :y腿 :y腿r :yx腿 :yx腿r
- make :heading=:r :penx=:x :peny=:y :penc=:penc+1
- bk 80
- rt 180
- TO 左臂 :z臂 :z臂r :z腕 :z腕r
- bk 65
- rt :z臂+:z臂r
- fd 40
- 左腕 :z腕 :z腕r
-
- TO 右臂 :y臂 :y臂r :y腕 :y腕r
- bk 65
- rt :y臂+:y臂r
- fd 40
- 右腕 :y腕 :y腕r
-
- TO 左腕 :z腕 :z腕r
- make :penc=:penc+1
- rt :z腕+:z腕r
- fd 30
-
- TO 右腕 :y腕 :y腕r
- make :penc=:penc+1
- rt :y腕+:y腕r
- fd 30
-
- TO 左大腿 :z腿 :z腿r :zx腿 :zx腿r
- rt :z腿+:z腿r
- fd 50
- 左小腿 :zx腿 :zx腿r
-
- TO 右大腿 :y腿 :y腿r :yx腿 :yx腿r
- rt :y腿+:y腿r
- fd 50
- 右小腿 :yx腿 :yx腿r
-
- TO 左小腿 :zx腿 :zx腿r
- make :penc=:penc+2
- rt :zx腿+:zx腿r
- fd 50
-
- TO 右小腿 :yx腿 :yx腿r
- make :penc=:penc+2
- rt :yx腿+:yx腿r
- fd 50
-
- to 动 :x :y :r :z臂r :y臂r :z腕r :y腕r :z腿r :y腿r :zx腿r :yx腿r
-
- 头 :pen0 :pen1 :r :pen2 :z臂r :pen3 :y臂r :pen4 :z腕r :pen5 :y腕r :pen6 :z腿r :pen7 :y腿r :pen8 :zx腿r :pen9 :yx腿r
- make :pen0=:pen0+:x :pen1=:pen1+:y :pen2=:pen2+:z臂r :pen3=:pen3+:y臂r :pen4=:pen4+:z腕r
- make :pen5=:pen5+:y腕r :pen6=:pen6+:z腿r :pen7=:pen7+:y腿r :pen8=:pen8+:zx腿r :pen9=:pen9+:yx腿r
-
-
- TO MAIN
- //text 32 0 15 宋体 你好
- make :pen0=0 :pen1=0 :pen2=0 :pen3=0 :pen4=0 :pen5=0 :pen6=0 :pen7=0 :pen8=0 :pen9=0 :PENw=4
- MEMUSE
- WHILE
- 动 1 0 1 10 -10 -5 5 0 -10 0 10
- MEMSEE
- WAIT 100
- 动 0 0 0 10 -10 -5 5 -10 0 10 0
- MEMSEE
- WAIT 100
- 动 0 0 0 10 -10 -5 5 0 10 0 -10
- MEMSEE
- WAIT 100
- 动 -1 0 1 10 -10 -5 5 10 0 -10 0
- MEMSEE
- WAIT 100
- IF :penx>500
- make :penx=-500
- ]
- ]
-
- WAIT 100
复制代码 效果图(均为外链,随时失效)
|