smal animation example modification - gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
diff options
context:
space:
mode:
authorfrancesco <francesco.bbt@gmail.com>2010年10月24日 12:53:15 +0200
committerfrancesco <francesco.bbt@gmail.com>2010年10月24日 12:53:15 +0200
commit0f2d2469cbbcf0bd9827d0a391daeb0ae936f1f9 (patch)
treeb07b27aaeb9bbe83bf5dd5ee2c375d8aa71b51d1
parentb3f1247acef37c6c8894788e2055ebd59228c0d2 (diff)
downloadgsl-shell-0f2d2469cbbcf0bd9827d0a391daeb0ae936f1f9.tar.gz
smal animation example modification
Diffstat
-rw-r--r--examples/anim.lua 5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/anim.lua b/examples/anim.lua
index 943721e3..3aac949f 100644
--- a/examples/anim.lua
+++ b/examples/anim.lua
@@ -48,7 +48,7 @@ function demo2()
plt:addline(s, rgb(0.6, 0.6, 0.6), {}, {{'translate', x=x, y=y}})
end
plt:pushlayer()
- local N, R, nc = 256, 5.0, 15
+ local N, R, nc = 128, 5.0, 8
for k = 0, N * nc do
local r = R * cos(pi*k/N)^2
local th = 2*pi*(k/(N*nc*10))
@@ -66,7 +66,6 @@ function demo3()
local p = plot 'y = f(x)'
local x0, x1 = 0, 10*pi
local cc = fxline(f, x0, x1, k)
- p:addline(cc)
p.sync = false
p:pushlayer()
p:show()
@@ -78,6 +77,7 @@ function demo3()
ca:line_to(x, 0); ca:line_to(0, 0); ca:close()
p:clear()
p:add(ca, rgba(1,1,0,0.6))
+ p:addline(cc)
p:flush()
end
end
@@ -106,6 +106,5 @@ function demo4()
p:flush()
end
- p:poplayer()
return p
end
generated by cgit v1.2.3 (git 2.39.1) at 2025年10月02日 05:06:21 +0000

AltStyle によって変換されたページ (->オリジナル) /