// tipPos2D = xz coordinates of tip
float3 getWidthOffset(float width, float2 tipPos2D) {
    float2 dirBaseToTip = normalize(tipPos2D);
    return float3(-dirBaseToTip.y * width, 0, dirBaseToTip.x * width);
}

float3 bendParabula(float3 tipPos, float posOnBlade, float bendStrength) {
    float len = length(tipPos.xz); // Länge des flachen Grashalms
    float b = tipPos.y;

    posOnBlade = posOnBlade * len;

    float y = (-pow(posOnBlade - len, 2) * b) / pow(len, 2) + b;
    float2 xz = normalize(float2(tipPos.x, tipPos.z)) * posOnBlade * bendStrength;

    return float3(xz.x, y, xz.y);
}
