B
B
buzzi8882014-08-28 16:52:14
Algorithms
buzzi888, 2014-08-28 16:52:14

How to lubricate the line?

There is a set of heights - a one-dimensional array of numbers[1,2,5, ...] , you need to "blur" each point without changing the dimension of the array. It's like a blur, but only for the line. That is, you need to calculate some average of the nearest for each height.
A bicycle is not required, is it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
X
xandox, 2014-08-28
@xandox

Use a twist.
In the end - you select a window (an array of some length, 3,5,7) whose elements are some coefficients. This window passes through the array. The new array element value is the sum of the weighted elements that fall into the window divided by the length of the window. For example, to calculate the average with neighbors, you need a window [1,1,1]. You just need to decide what to do with the edges. Usually they are either ignored or considered so that the end is followed by the beginning, and vice versa. I hope I explained clearly. If you ask.

T
Timur Sergeevich, 2014-08-28
@MyAlesya

Try the bike!

S
Sergey, 2014-08-28
Protko @Fesor

Bezier Curve + Wu Algorithm
habrahabr.ru/post/130873

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question