Fill space between cubic bezier curves and straight lines

hi guys, i am rendering shape what consists with cubic bezier curves and straight lines and with lines i can build(new THREE.CubicBezierCurve3, new THREE.Line) it but i can’t fill space between lines. 2 screen what i have, 1 what i need


Maybe you can achieve the form with a solution from the collection ?

ThickBorder2D
ColorToTexture_FragmentShader
2022-02-07 21.25.56

@kenny
Any chance to provide an editable live code example of how you build those contours? (jsfiddle, codepen, codesandbox etc.)

Also, have a look at this forum post: Ringsegment function leads to strange behaviour - #8 by prisoner849

@prisoner849

Ah, thanks for sharing :slight_smile: Will have a look at it later.

I tried another way with Shape and ShapeGeometry (and simple trigonometry): https://codepen.io/prisoner849/pen/qBVRjKg?editors=0010

4 Likes

This is the best I could think of, having the data structure provided: https://codepen.io/prisoner849/pen/ExbWaaG?editors=0010
Pretty much based on your code.

изображение

1 Like