Lab- lets get twisted

Assignment Help Computer Graphics
Reference no: EM13909443

LAB- LET'S GET TWISTED

We will draw Bezier curves in this assignment, and some objects along them. You can add control points by left-clicking on the mouse. The points will be added to a list called "ptList[MAXPTNO]" and the variable "nPt" will record the number of points. Here are the tasks that you are supposed to do:

1. In your skeleton program, when you click a new point on the screen, it will be displayed as a black point. Your first task is to draw the control lines (green ones) by joining them. This control lines are being toggled by pressing the key "L" and by the variable "displayControlLines".

2. By pressing the key "E", you should erase all control points and start as new.

3. For every four points, draw a Bezier curve. So, the first 4 points, namely the 1st, 2nd, 3rd, and 4th points of your input, will form the first curve. Then the next curve is continuously formed by the 4th to 7th points (note that the 4th point is shared by two curves, so are the 7th, 10th,... etc). The second curve is NOT formed by the 5th to 8th points instead. The number of line segments to approximate the curve is in the variable NLINESEGMENT. You are NOT recommended to use the divide-and- conquer paradigm (De Casteljau Algorithm) in this assignment. This will just make things harder for you.

4. By pressing the key "C" (Toggle the variable "C1Continuity"), you will modify the SECOND point of all curves (except the first one) and make them C1 Continuous. The new second control point will be displayed in red, and the original second control point will be dimed as grey. And this function should be reversible. And all the functions in this assignment should be working in BOTH modes of being C1 Continuous and not C1 Continuous.

5. Draw the tangent vectors by pressing the key "T" (Toggle the variable "displayTangentVectors"). The number of tangent vectors you need to draw is in the variable NOBJECTONCURVE. There is already a function drawRightArrow() to draw an arrow for you.

6. At the same manner of the tangent vectors, draw copies of an object of your own creation along the curve (Toggled by "O" and the variable "displayObjects"). You can use your Assignment 1 if you want. The objects should be drawn on the reference frame with the tangent and the normal vectors on the curve. In the sample program, the object is simply ONE circle with two lines on the north and south poles of the circle. By repeating it on the curve, it looks like a worm.

7. Create one beautiful figure and submit "savefile.txt" together with your main.cpp. (There are two functions "R" and "W" provided for you to read and write your current control points into a file called "savefile.txt".)

Submit the zipped file of your whole directory, together with your "savefile.txt" for your drawing. However, please clean and delete any files unnecessary, e.g. the whole "Release" and "Debug" directories, and the "lab 4.ncb" file. The zip file should not be larger than 5 Mb. Also, submit a "readme.txt" if you have any extra features that are impressive or any explanation of your program.

Final note: All the reshape, resize functions should be already handled. Unless you messed them up, you should not need to take care of them. You can also assume all the points input are within the 600 x 600 windows of the screen. Last but not the least; this is a new assignment for this year. There may be some amendments or modifications, please follow tightly with the forum.

1874_img.png

Attachment:- Assignment.rar

Reference no: EM13909443

Questions Cloud

Elisabeth kübler-ross proposed five psychological stages : Elisabeth Kübler-Ross proposed five psychological stages of dying: denial and isolation, anger, bargaining, depression, and acceptance. These stages do not occur in a specific order, and the stages often overlap. Dying people often have to rework the..
Compute the value of this stock : A firm does not pay a dividend. It is expected to pay its first dividend of $0.28 per share in three years. This dividend will grow at 10 percent indefinitely. Use an 11 percent discount rate. Compute the value of this stock
Compute and interpret the contribution margin ratio : Compute and interpret the contribution margin ratio using the following data: sales
Find the probability density of ui : Show that each inter-renewal interval Xi = Si - Si-1  (where S0  = 0) is the sum of two  independent rv s, Yi + Ui where Yi is the ith service time; find the probability density of Ui.
Lab- lets get twisted : LAB- LET'S GET TWISTED, We will draw Bezier curves in this assignment, and some objects along them. You can add control points by left-clicking on the mouse. The points will be added to a list called "ptList[MAXPTNO]" and the variable "nPt" will r..
Evaluate student''s understanding of grammatical operations : Objective: To evaluate student's understanding of grammatical operations and topic sentences recognition ability which makes him/her good English language reader.
Contribution margin per unit : SBD Phone Company sells its cordless phone for $ 90 per unit. Fixed costs total $ 162,000, and variable costs are $ 36 per unit.
Difference between server-side and client-side scripting? : difference between server-side and client-side scripting?
How will the break even point in units change in response : Refer to the information from QS 21 6. How will the break even point in units change in response to each of the following independent changes in selling price per unit, variable cost per unit, or total fixed costs?

Reviews

Write a Review

Computer Graphics Questions & Answers

  Develop a five-year strategic plan with cost estimates and

develop a five-year strategic plan with cost estimates and a time line.describe the situation facing mensa at the time

  Create the movement of the car from the left

Create the movement of the car from the left o the screen to the right - Add the 2 wheels to the vehicle using the GlutWireSphere

  Develop a checklist for preparing the procedures manual

Research the library and the Internet for information on suggested steps or checklists for planning preparation of a procedures manual. Develop a checklist for preparing the procedures manual

  Ethernet equipment to modernize the network

An older network using ten baseT technology needs an upgrade. The network haves a total of 220 workstations and ten servers and has a network diameter of three-hundred meters.

  Display the properties that correspond to the search

Display the properties that correspond to the search made by the user on the search page. 10% for search functionality - 10% for the displaying the results in an effective and pleasant way

  Use turtle graphics to draw simple slogan in all upper case

Use turtle graphics to draw a simple slogan in all upper case letters. Turtle graphics is a simple model for graphics programming in which you have a "turtle" that can turn left or right and can move forward.

  What are the methods of motion specifications

Define Computer animation. What are the methods of motion specifications? What are the steps in animation sequence?

  Develop the image manipulations

Develop the image manipulations

  Write a memo report to your boss communicating the trends

Enter the spreadsheet data below and then prepare graphs that will help you see trends or patterns. Create at least three different graph types as part of your analysis.  That means a bar, a pie and a line graph, for example.

  Design effective graphics for visual presentations

Design effective graphics for visual presentations

  Draw and explain the diagram of a raster scan system

Draw and explain the diagram of a Raster scan system with a display processor. Explain each unit of the diagram.

  How the product positioning is aligned with mcdonalds

how the product positioning is aligned with mcdonalds corporate strategy. identify potential gaps in the product line

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd