@@ -733,8 +733,8 @@ local half_res = {
733733-- Arithmetic Progression
734734-- Offset
735735local o = {
736- x = offset.x * res.x / count.y,
737- y = offset.y * res.y / count.x
736+ x = offset.x * res.x / math.max( count.y, 1) ,
737+ y = offset.y * res.y / math.max( count.x, 1)
738738}
739739
740740-- Common Difference
@@ -846,13 +846,15 @@ local a_st = math.max(tonumber(_0.st_a) or _10, 0.0) * 0.01 _10 = nil
846846local a_ed = math.max(tonumber(_0.ed_a) or _11, 0.0) * 0.01 _11 = nil
847847_0 = nil
848848
849- local a_grad = a_ed - a_st
850- local last_idx = n - 1
851- local st, ed, step = 0, last_idx, 1
849+ local range = n - 1
850+ local st, ed, step = 0, range, 1
852851if (composite == 0) then
853852 st, ed, step = ed, st, -1
854853end
855854
855+ local a_grad = a_ed - a_st
856+ local a_scale = math.max(range, 1)
857+
856858if (sync) then
857859 local s = obj.zoom * obj.getvalue("zoom") * 0.01
858860 local a, oa = obj.getvalue("aspect"), obj.aspect
868870
869871obj.effect()
870872for i = st, ed, step do
871- local t = i / last_idx
873+ local t = i / a_scale
872874 local alpha = a_st + a_grad * t
873875 i = i + offset
874876 obj.draw(x * i, y * i, z * i, math.pow(scale, i), alpha, rx * i, ry * i, rz * i)
0 commit comments