On Donnerstag, 20. Juli 2017 10:28:17 CEST Elvis Stansvik wrote: > 2017-07-20 10:23 GMT+02:00 Jean-Michaël Celerier > > <jeanmichael.celer...@gmail.com>: > > You can just compute the sine directly : > > for(int i = 0; i < width; i++) > > { > > > > int x = i; > > int y = height / 2 + amplitude * std::sin(2 * M_PI * freq * i / width > > + > > > > phase); > > > > path.lineTo(x, y); > > > > } > > I think he wanted to avoid an approximation with straight lines and > use cubic beziers. > If he doesn't do it, Qt will just do it for him based on the bezier curves.
`Allan _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest