bezier curve example
2016-08-23
0 0 0
no vote
Other
Earn points
#include <iostream> #include <vector> #include <math.h> #include "BezierPoint.h" using namespace std; BezierPoint bezier(std::vector<BezierPoint>& pts, double t); double choose(double a, double b ); double factorial(double num); int main(void){ std::vector<std::vector<BezierPoint> > pts; char endPointCount = 0; double inx; double iny; int ptCount = 0; int endPoint; double deltaT; cin >> ptCount >> deltaT; for(int i = 0; i < ptCount; i++){ cin >> inx >> iny >> endPoint; BezierPoint p(inx, iny); if(endPointCount == 0 && endPoint == 1){ pts.push_back(std::vector<BezierPoint>()); pts[pts.size() - 1].push_back(p); endPointCount++; continue; } pts[pts.size() - 1].push_back(p); if(endPointCount != 0 && endPoint == 1 && i != ptCount - 1){ pts.push_back(std::vector<BezierPoint>());
c++
示例
曲线
贝塞尔
Related Source Codes
Local Path Planning Algorithm - DWA Algorithm
0
0
no vote
enDAQ-Shock-Data-Share-SRS-Blog
0
0
no vote
Calling chatGPT in a Windows application
0
0
no vote
Test Hello world
0
0
no vote
RCS calculation by one-way ray tracing
0
0
no vote
No comment