Thanks all, finally I resolved it.
1. I created a buffered geometry, by specifying its size which is equals to number of points I need to draw line.
var buffer_geometry = new THREE.BufferGeometry();
buffer_geometry.attributes = {
position: {
itemSize: 3,
array: new Float32Array(numberofpoints)
}
};
2. Keep the position array to update it while rendering
positions = buffer_geometry.attributes.position.array;
3. In update function, each 6 neighbor points were updated by my x,y,z values on the curve:
positions[ i * 6 ] = x;
positions[ i * 6 + 1 ] = y;
positions[ i * 6 + 2] = z;
positions[ i * 6 + 3] = x + 0.1;
positions[ i * 6 + 4] = y + 0.1;
positions[ i * 6 + 5] = z + 0.1;