Вопрос

I know how to draw bezier curves from four control points. However, even if the control points are from 2D grids, the generated points are not neccessarily in 2D grid. Please help.

How would I generate all the discrete bezier curve cordinates for a given set of control points.

Это было полезно?

Решение

Same way you generate the regular points. Iterate over t, round the resulting coordinates, draw lines between the coordinates. Oversample t and you're wasting time, undersample t and it'll look extremely ugly. Your best bet is to do subsampling and then decide which coordinates are best to use for rounding-and-connecting.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top