Tick generator using interval.

Close #1166.
this is not a good pattern, using iterative addition in a for loop is a good way to accumulate floating point errors. use multipliction times an index instead.