Domanda

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.

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top