Question

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.

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top