Computer Graphics

Here are some videos of the assignments I worked on the fall of 2009 for CS 535 - Interactive Computer Graphics at Purdue. The videos are from the third, fourth and fifth assignments, which used as a base the first two.
Rasterization, shading, lighting and texture mapping:
  • Triangle rasterization with z-buffering.
  • Gouraud and Phong shading.
  • Diffuse and specular lighting.
  • Texture mapping.
Projective texture mapping:
  • Projective texture mapping.
  • A projector (non-matching projective texture mapping).
  • Shadow mapping.
Environment mapping:
  • Cube mapping.
  • Environment mapped reflections.
  • Fresnel reflections.


Algoritmos para el ICPC de la ACM (Algorithms for the ACM-ICPC)

Download: Chapter 3 (sample).
Requirements: Acrobat Reader.
As I began participating in the ICPC at the same time as my school, my coach (a math professor) and I didn't have a clue on what to study and where to find it. After training and competing for about three years, we got familiarized with the most common algorithms but there still was the issue that many things we learned were scattered on different bibliography and wasn't in Spanish (which shouldn't be a problem for the ICPC, but it might be for Olympiads).
In my final semester I decided to graduate by making a thesis which would be a collection of algorithms that are important to know, being approached from a contest point of view. It's currently being considered for publication as a book with the help of the University (I just need to fix and polish a few things).

Table of content:
  1. Introduction.
    1. Importance.
    2. Problematic.
    3. Methodology.
    4. Scope.
    5. Background.
    6. ICPC rules.
  2. Complexity analysis.
    1. Introduction.
    2. Algorithm analysis.
    3. Best, worst and average cases.
    4. Complexity bounds.
    5. Algorithm efficiency.
    6. Class P (Polynomial) and NP (Nondeterministic Polynomial).
  3. Sorting and searching.
    1. Introduction.
    2. Insertionsort.
    3. Hoare's Quicksort.
    4. Heapsort.
    5. Countsort.
    6. Linear search.
    7. Binary search.
  4. Prime numbers.
    1. Introduction.
    2. Factors.
    3. Primality.
    4. Primes List.
    5. Sieve of Eratosthenes.
    6. Prime factorization.
  5. Arithmetic miscellany.
    1. Introduction.
    2. Greatest common divisor and least common multiple.
    3. Extended Euclidean algorithm.
    4. Base conversion.
    5. Modular arithmetics exponentiation.
    6. Fibonacci numbers.
    7. Joseph's problem.
  6. Big number arithmetics.
    1. Introduction.
    2. Storing.
    3. Reading and writing.
    4. Inequality.
    5. Bit operations.
    6. Addition.
    7. Subtraction.
    8. Multiplication.
    9. Division and modulo (remainder).
    10. Square root.
  7. Geometric algorithms.
    1. Introduction.
    2. Maximum number of points lying on a line.
    3. Intersection line with line, line with segment, and segment with segment.
    4. Triangle incircle and circumcircle.
    5. Area of a polygon.
    6. Convex hull.
    7. Centroid.
  8. Dynamic programming.
    1. Introduction.
    2. Maximum interval sum.
    3. Longest Increasing / Decreasing Subsequence (LIS, LDS).
    4. Longest Common Subsequence (LCS).
    5. Edit distance.
    6. Zero-One Knapsack.
    7. Counting change.
    8. Integer partition.
    9. Matrix chain multiplication.
  9. Exhaustive searching and backtracking.
    1. Introduction.
    2. Farey sequence and Stern-Brocot tree.
    3. Floodfill.
    4. Shortest distance in a maze.
    5. Permutations.
    6. Prunes.
    7. Eight queens problem.
    8. Sudoku.
  10. Graphs.
    1. Introduction.
    2. Bicoloring.
    3. Topological sort.
    4. Shortest path: Dijkstra.
    5. All pairs shortest path: Floyd-Warshall.
    6. Minimum Spanning Trees: Prim and Kruskal.
    7. Eulerian Path.
    8. Articulation point (cut vertex).
  11. Other.
    1. Introduction.
    2. Root-finding algorithms.
    3. Solutions of a system of linear equations.
    4. Basic data structures (stacks, queues and linked lists).
    5. Binary trees.
    6. Greedy algorithms.
    7. Divide and conquer.
  12. Codes in C.
    1. Sorting and searching.
    2. Prime numbers.
    3. Arithmetic miscellany.
    4. Big number arithmetics.
    5. Geometric algorithms.
    6. Dynamic programming.
    7. Exhaustive searching and backtracking.
    8. Graphs.
    9. Other.
Appendix:
  1. Contest strategies.
  2. Pascal reference.
  3. C reference.
  4. Divisors y congruence properties.
  5. Internet links.
  6. Run-time errors table.
  7. Symbols.
  8. Groups of problems by category.
  9. Internal contest problems.
  10. Regional contest problems.
  11. Performance statistics of Pacal and C codes.
  12. ASCII table.


© Pier Paolo Guillen Hernandez
World of πer