This can be done by measuring the distance between the touch and release point. Along with measuring the time difference from when the touch started until the release happened.
Then simply take the distance and divide it with the time, and this would give you a relative force.
To give the general idea:
clock = new THREE.Clock();
function onTouch(event) {
startTime = clock.getElapsedTime();
startPosition = new THREE.Vector3(e.clientX, "y": e.clientY);
}
function onRelease() {
endTime = clock.getElapsedTime();
endPosition = new THREE.Vector3(e.clientX, "y": e.clientY);
diff = startPosition.copy().sub(endPosition.x);
distance = diff.length();
// Remember to check if endTime > startTime
force = distance / (endTime - startTime);
// Then multiply the force by some factor and apply it
}
onTouch()
being called when the touch begins and onRelease()
begin called when it ends.
Since you already have the touch and release points, you can calculate the angle of the flick. Then project that according to some other vector you have deciding the orientation of the phone in this case.
For getting the trajectory of the path you apply force to an object and simulate it for a n steps tracking the position. After that draw a line between the collected positions.
For an existing project take a look at ezartech/pokemon-go-experiment.