(Replaced content with "CG1_2012/en")
 
(16 intermediate revisions by 2 users not shown)
Riadok 1: Riadok 1:
[[File:cg1_2011_650.png]]
+
[[CG1_2012/en]]
 
+
= Practical Seminars on Computer Graphics 1 (Winter 2011) =
+
* On every seminar we will implement selected problems/algorithms from lessons. We will usually start with a prearranged template downloadable from with site.
+
* As a programming language we will use C#. We will use Visual C# 2010 Express as development environment. Alternatively you can use MonoDevelop (Linux / Mac OSX) on your own machine.
+
* Your code should be well formatted and commented. Titles of functions, classes, variables should be representative for their purpose.
+
* Every week you have to finish and submit the assignment as homework.
+
* At the end of the semester you can submit the project.
+
* Any kind of '''cheating''' is punished by '''withholding 15 points for all''' involved students. Situation where only part of code is shared is also considered cheating!
+
* Attendance at seminars is '''optional but recommended'''. Your '''activity''' during seminar can be awarded with '''max 3 bonus points''' during the semester.
+
* Seminars are conducted by
+
** Matej Hudak (subseth.mato@gmail.com)
+
** Juraj Onderik (wonderik@gmail.com)
+
* Schedule of seminars is
+
** Tue (8:10) - Room H6
+
** Tue (18:10 - Room H3
+
** Wed (18:10) - Room F248
+
 
+
== Homeworks ==
+
* As a homework, you will program what we could not finish during exercise. Assignment and template will be downloadable from this site. See exercises.
+
* Homework must be submitted by email to [mailto:cg1.2011.hw@gmail.com  cg1.2011.hw@gmail.com] every week until '''next Tuesday 06:00 (morning)'''.
+
* Your submission email '''must''' have title in form 'ExNN' where NN is the number of exercise, eg. Ex05.
+
* You can get '''max 3 points per homework''', totally 33 points. Late submission is for 0 points.
+
* It is required to submit '''zipped source code of your homework'''. Do not send executable files. Homework without source code is for 0 points!
+
 
+
== Project ==
+
* Project is your opportunity to gain '''max 9 points bonus points''' and it is optional.
+
* Project must be submitted by email to [mailto:cg1.2011.hw@gmail.com  cg1.2011.hw@gmail.com]
+
** until '''27.12.2011 - 23:59''' if your final term is before 20.1.2012
+
** until '''13.1.2012 - 23:59''' if your final term is after 20.1.2012
+
* It is required to submit '''source code of your project'''. Executable files are optional. Projects without source code is for 0 points!
+
* Every method of your app must be coded by you - external libraries are not allowed
+
* Comment your code and add help!
+
* Project assignment
+
** Create kick-ass demo app which can visualize 3D cube in this way:
+
*** Implement mathematical library to translate, scale and rotate cube.
+
*** Use perspective matrix to project cube from 3D space to 2D space
+
*** Implement scanline rasterization of cube's faces with extension of mapping a square texture
+
*** Solve visibility of cube's faces
+
*** Create GUI
+
 
+
 
+
== Summary ==
+
* Submission: [mailto:cg1.2011.hw@gmail.com cg1.2011.hw@gmail.com]
+
* Homeworks: +33 points (11x3)  /deadline Tuesday 06:00 AM /'''email title: ExNN'''/
+
* Project: +9 bonus points
+
* Cheating: -15 points
+
* Minimum: +14 points
+
* Attendance: Optional
+
* [https://docs.google.com/spreadsheet/pub?hl=en_US&hl=en_US&key=0AhREYgn4NR6AdFVOek9id2VrWFpnQWg0TWdiM2dpUkE&single=true&gid=0&output=html YOUR EVALUATION !] (we add points continuously)
+
** Final Score: 33 points = final score 45
+
 
+
== Seminars ==
+
 
+
=== Exercise01 [20/21.9] "Introduction" ===
+
* There are no points for this seminar.
+
* [http://www.csharp-station.com csharp tutorials]
+
* [http://csharp.net-tutorials.com visual c# tutorials]
+
* Visual Studio Tips
+
** '''F2''': Rename object/class/property/field...
+
** '''F5''': Build and debug solution
+
** '''Shift + F5''': Stop debugging solution
+
** '''F9''': Add/Remove break-point at current line
+
** '''F12''': Navigate to definition/declaration of object/class...
+
** '''CTRL + Space''': List members of object/class after "." or parameters of method after "("
+
 
+
=== Exercise02 [27/28.9] "Vectors and Matrices" ===
+
* Introduction to C#
+
* classes: Vector3, Matrix33
+
* Add(V3, V3), Sub(V3, V3), Cross(V3, V3), Dot(V3, V3)
+
* Add(M3, M3), Mul(M3, M3), Sub(M3, M3)
+
* Mul(M3, V3), Mul(V3, M3)
+
* Gui calculator:
+
** 3x1 vector (operator) 3x1 vector = 3x1 vector
+
** 3x3 matrix (operator) 3x3 matrix = 3x3 matrix
+
* Assignment
+
** Create a simple application for vectors(3x1) and matrices(3x3). Create classes Vector3 a Matrix33. Create GUI according to final sample. Implement operations for vectors: W = U + V, W = U - V, W.X = Dot(U,V), W = Cross(U,V), W.X = U.Length and for matrices: C = A + B, C = A - B, C = A * B, W = A * V, W = U * B. Implement them as operators '+', '-', '*',.. Create calculator application with all operations working similar as in final sample.
+
** Final sample [[File:Ex2.zip]]
+
** template for homework [[File:Temp.zip]]
+
 
+
=== Exercise03 [04/05.10] "Transformations 1" ===
+
* classes: Vector4, Matrix44, Polyline
+
* A.Transpose(), A.Inverse(), A.Determinant()
+
* RotateX/Y/Z/XYZ
+
* Translate(K), Scale(K)
+
* Drawing
+
** Polyline
+
** Free
+
* Assignment
+
** Create a simple application with transformations and drawing. In transformations implement operations in Matrix44 labeled 'To Do'. In drawing implement free drawing using mouse left button_(down, move, up). Fill all sections labeled 'To Do'. Create 'Clear All' button. Create final application with all operations working similar as in final sample.
+
** Final sample [[File:Ex3.zip]]
+
** template for homework and seminar - [[File:TemplateEx3.zip]]
+
** Inverse Matrix: [http://www.cg.info.hiroshima-cu.ac.jp/~miyazaki/knowledge/teche23.html]
+
 
+
=== Exercise04 [11/12.10] "Transformations 2" (Onderik) ===
+
* Implement definition and modification of simple polyline objects. Following functionality have to be implemented based on the mouse butons and modifier keys.
+
* Left MB: Select pivot of one closest polyline.
+
* Left MB + SHIFT: Select more pivots.
+
* Left MB + CTRL: Create and place new polyline at the mouse cursor.
+
* Left MB + ALT: Add new point to the first selected polyline at mouse cursor.
+
* Right MB: Move seleted polylines in plane XY.
+
* Right MB + CTRL: Rotate selected polylines around Z-axis in XY plane.
+
* Right MB + SHIFT: Scale selected polylines uniformely in XY plane.
+
* '''Sample''': [[File:CG1.Ex04.zip]]
+
* '''Template''': [[File:CG1.Ex04.Template.zip]]
+
 
+
=== Exercise05 [18/19.10] "Projection" (Hudak) ===
+
* Implement 3 types of projection: orthogonal, perspective and parallel. Use Help to assign correct polyline to correct projection. Implement method to defined segment of projection line as projection of polyline 3(orange). Methods have to be a projections by definition and they also should be transparent to interaction with polylines(during rotation, scale or translate).
+
* Materials
+
** [http://www.netgraphics.sk/projection projection and projection equations]
+
** [http://arcsynthesis.org/gltut/Positioning/Tut04%20Perspective%20Projection.html projection 2D to 1D]
+
* '''Sample''': [[File:CG1.Ex05.zip]]
+
* '''Template''': [[File:CG1.Ex05.Template.zip]]
+
 
+
=== Exercise06 [25/26.10] "Rasterization of Line" (Onderik) ===
+
* Implement rasterization of line using both DDA and Bresenham algorithm. See sample and template for more info.
+
* '''Sample''': [[File:CG1.Ex06.zip]]
+
* '''Template''': [[File:CG1.Ex06.Template.zip]]
+
 
+
=== [1/2.11] - No Exercise ===
+
* '''study, study, study'''
+
 
+
=== Exercise07 [8/9.11] "Rasterization of Circle and Ellipse" (Hudak) ===
+
* Implement rasterization of Circle using both Bresenham and Midpoint algorithm. Also implement rasterization of Ellipse. See sample and template for more info. Results have to be rasterizations by definition (e.g. use algorithms from teoretical seminars or additional materials - '''inspiration only!!!'''). Create final application with all operations working similar as in final sample.
+
* Materials
+
** [http://www.netgraphics.sk/circle-and-ellipse Circle and Ellipse]
+
** [http://homepage.smc.edu/kennedy_john/bcircle.pdf Bresenham Circles]
+
** [http://homepage.smc.edu/kennedy_john/belipse.pdf Bresenham Ellipse]
+
* '''Sample''': [[File:CG1.Ex07.zip]]
+
* '''Template''': [[File:CG1.Ex07.Template.zip]]
+
 
+
=== Exercise08 [15/16.11] "Visualization of Implicit Function" (Onderik) ===
+
* Implement rasterization of several simple 2D (implicit) functions (pixel(i,j) = f(i,j)) as shown in sample solution. Control points are inserted by clicking with right mouse button into canvas. Implement all GUI controls similar to sample solution.
+
** Sphere (torus) are defined by distance from image center and given radius1 (and radius2).
+
** Gradient in cylinder case is proportional to the distance from line passing through two control points.
+
** Voronoi (diagram) assigns each pixel the color of the nearest control point
+
** Bloby case: color = sum_k{(1 - d_k/radius1)^3} where d_k is bounded distance from each control point (c_k), ie. if d_k > radius1 set d_k = radius1
+
** Plasma effect: http://www.mennovanslooten.nl/blog/post/72
+
* '''Sample''': [[File:CG1.Ex08.zip]]
+
* '''Template''': [[File:CG1.Ex08.Template.zip]]
+
 
+
=== Exercise09 [22/23.11] "Scanline of Polygon" (Hudak) ===
+
* Implement scanline algorithm. Create final aplication similar to sample.
+
*Functionality
+
** RMB - add vertex to polygon
+
** If polygon is closed, start scanline.
+
* '''Sample''': [[File:CG1.Ex09.zip]]
+
* '''Template''': [[File:CG1.Ex09.Template.zip]]
+
 
+
=== Exercise10 [29/30.11] "Flood Fill" (Onderik) ===
+
* Implement several variations of flood fill algorithm. Create final aplication similar to the sample.
+
** Scanline floodfill materials [http://www.codeproject.com/KB/GDI/QuickFill.aspx]
+
* '''Sample''': [[File:CG1.Ex10.zip]]
+
* '''Template''': [[File:CG1.Ex10.Template.zip]]
+
 
+
=== Exercise11 [06/07.12] "Clipping" (Hudak) ===
+
* Implement Cohen-Sutherland algorithm similar to sample application.
+
* 1 optional bonus point - one clipping algorithm of your choice different from Cohen-Sutherland.
+
* Functionality
+
** LMB - add vertices and lines
+
** RMB + move - draw clipping polygon and start clipping
+
* '''Sample''': [[File:CG1.Ex11.zip]]
+
* '''Template''': [[File:CG1.Ex11.Template.zip]]
+
 
+
=== Exercise12 [13/14.12] "Visibility" (Onderik) ===
+
* TODO
+
* '''Sample''': [[File:CG1.Ex12.zip]]
+
* '''Template''': [[File:CG1.Ex12.Template.zip]]
+

Aktuálna revízia z 22:48, 10. september 2012

CG1_2012/en