Issue with creating a basic uphill curved line

Hi guys! Three.js newbie here. I’m trying to make a basic uphill curved line. I kind of accomplished what I wanted to do, but the problem is that the line makes an unexpected slight downhill curve before going up. I would like it just to go straight until it goes uphill. Any idea why?

Example here: romantic-nightingale-t7of0 - CodeSandbox

A CatmullRomCurve3 is a compensation curve through given points.
You can try to specify more points new THREE.Vector3( , , ).

Thanks for the answer! Do you think there’s a better approach rather than using CatmullRomCurve3to achieve what I need?

Have you tried all this?


You can create positions for a user-defined geometry in a loop with function values (e.g. Exponentiation - Wikipedia ). But the programming is more complex.