forked from chudongjingling/open_code
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d8fa9e0
commit 847b74b
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
init(1) | ||
mSleep(1000) | ||
|
||
local x0 = 1010 --起始坐标x | ||
local y0 = 698 --起始坐标y | ||
local rr = 20 --设置递增半径 | ||
local l = 10 --设置点间距 | ||
local p = 0 --初始化角度 | ||
local r = 30 --设置首圈半径 | ||
local rn = 10 --设置圈数 | ||
touchDown(x0, y0) | ||
mSleep(100) | ||
for var = 1,rn do | ||
while p < math.pi * 2 do | ||
x = x0 + r * math.cos(p) | ||
y = y0 - r * math.sin(p) | ||
touchMove(x, y) | ||
mSleep(10) | ||
p = p + l/r | ||
end | ||
p = 0 | ||
r = r + rr | ||
end | ||
touchUp(x0, y0) |