Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The screen should start with an even amount of control points. We should be able to start with more or fewer points by changing the

The screen should start with an even amount of control points. We should be able to start with more or fewer points by changing the necessary parameters in the code before the next run. After displaying the points, by switching using the keyboard, it should be possible to display either a curve formed by connecting "two points tangent vectors" type Hermite arcs or a Bzier curve defined by all the points. The degree of the Bzier curve will obviously increase with more points. We can assume that there will be a maximum of 12 points. An example of Hermite arc output can be seen in the figure below. The placed points will be the yellow points, and the endpoints of the yellow segments start from them; unlike in the diagram, we will also draw the latter as small squares, for example. For the Hermite arcs, in addition to the curve, the placed points and tangent vectors should be visible, while for the Bzier curve, in addition to the curve, the points and the control polygon formed by connecting them should be visible. An example output of a Bzier curve (with control points and control polygon) can also be found at the link below. It is shown for 9 points, but in our case, the number of points will be even(6); that's the only difference. If the user moves the points, everything else determined by the given point should change in real time. It is sufficient to use one color, but it is, of course, possible to deviate from this, and it is even recommended.
Give me complete c++ code for this.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions