Skip to main content
留学咨询

辅导案例-CS4102

By May 15, 2020No Comments

CS4102 – Computer Graphics – Academic Year 2019/20, Semester 2, Practical 1 General information: For your benefit please take note of the following information: • Assignment title: Curves in Computer Graphics.. • Submission deadline: 9pm (2100) on the 11th March 2020. • Assignment weight: 60% of the coursework (which itself contributes 40% to the total module grade, the remaining 60% being covered by the exam). • Lateness penalty: Scheme B, 1 mark per 8-hour period, or part thereof. • Required submission content: a single file report (in PDF format), a standalone application (in Java or any other language of your choice), and the full source code. • Mark descriptors: https://info.cs.st-andrews.ac.uk/student-handbook/learning-teaching/ feedback.html • Good academic practice: https://www.st-andrews.ac.uk/students/rules/academicpractice/ The aim of this practical is to help you understand the key principles behind Be´zier curves, and give you hands-on experience with their implementation and manipulation. Basic specification (up to 16 marks): Your task involves the creation of an application which performs several functions. Firstly, by clicking on the drawing area of the main application window, the user should be able to select a sequence of n control points (you can either have the user enter the value of n first, or signal the end of input using some kind of mouse action, e.g. right click). When this process is complete, the application should draw three curves: • A single Be´zier curve defined by the control points, • A composite Be´zier spline, comprising cubic Be´zier curves (a quadratic one may be needed at the end, depending on the number of contol points) • An interpolating cubic polynomial spline such that: – It exhibits C1 continuity at control points, and – Its tangents’ directions at the end points should match those of the Be´zier curve defined by the same control points. Lastly, the user should be able to trigger (e.g. by clicking a button) the generation of a random point on the Be´zier curve (not the composite Be´zier spline). Display the point (e.g. as a small circle) and find the intersection of the line perpendicular to locality of the Be´zier curve with the interpolating cubic polynomial spline, and display the result. Does the intersection always exist? Explain your answer. For drawing the curve you are free to use any library you wish (consider java.awt). However, all computation of relevant coefficients should be done from scratch. 1 Advanced specification (up to 20 marks): For additional marks, try to extend your application to work in 3D (you will need to consider how control points may be specific in 3D using a 2D canvas). Hints: The following suggestions should help you prevent common mistakes, and save time and effort: • Make sure that your submission is complete i.e. that the application can be executed on lab machines without the need for tinkering by the marker. It is not reasonable to expect the marker to debug and fix your code (e.g. hard-coded paths). • In your report, focus on the quality of content. Do not be overly verbose – well formed, succinct explanations are easier to read and more convincing than convoluted and excessively long verbiage. Aim for up to two pages of text but feel free to include images or screenshots to complement this content and illustrate your work better. • Start early. Ognjen Arandjelovic´ (Oggie) [email protected] 2

admin

Author admin

More posts by admin