简体   繁体   English

离散域中的贝塞尔曲线

[英]Bezier curves in discrete domain

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. 但是,即使控制点来自2D网格,生成的点也不一定在2D网格中。 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. 遍历t ,围绕生成的坐标,在坐标之间绘制线。 Oversample t and you're wasting time, undersample t and it'll look extremely ugly. 过采样T和你在浪费时间,undersample ,它会看起来非常难看。 Your best bet is to do subsampling and then decide which coordinates are best to use for rounding-and-connecting. 最好的选择是进行二次采样,然后确定最适合用于舍入和连接的坐标。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM