GithubHelp home page GithubHelp logo

cs560-computer-graphics-barycentric-interpolation's Introduction

CS560-Computer-Graphics-BaryCentric-Interpolation

  1. Texture interpolation and geometric warping

Description: Texture warping is a typical application of the graphical object manipulation. The basic operation is a triangle-based or quadrilateral-based transformation using either affine, or bilinear, or projective transformation. This assignment is designed to deform an image in a 2D space with interaction by using mouse to click and drag in real time. The warping consists of geometric shape warping and texture warping. This assignment is to enhance the concept of geometric warping, texture (image) operation, and interpolation.

Your implementation: In this assignment, you will implement the warping by deforming corner vertices of a rectangle. Meanwhile, the texture should be mapped onto the deformed rectangle area. image

Your implementation consists of: (a)Load and display the image “flower.bmp”. (b)Draw a rectangle (you can define the size by yourself) (c)Map the loaded image onto the rectangle area.

Implement following two functions:

(1)Place the mouse cursor on the center of the rectangle (blue dot), click to select the center vertex as an anchor vertex, then drag the anchor vertex to a certain place until the mouse button is released (red dot). During the procedure of deforming the rectangle, apply the texture mapping simultaneously. (Or: you can do an alternative deformation: Place the mouse in the corner of the rectangle, and stretch the rectangle plus texture mapping).40points

(2)Automatically rotate the image 360 degrees around z axis (display the image every 30 degrees) (30points)

(3)Load a 3D model from a file (.OBJ format) (e.g., teapot, car, or robot). File name can be hardcoded. Use mouse to rotate and/or zoom the teapot model.(20points)

image image image

(4) Extra points: Deform the model surface by a mouse; Map a texture to an arbitrary patch of the teapot surface.

(5)Extra points: Draw a CUBE, map the texture on the CUBE (6 faces). The CUBE can be viewed from any angles controlled by mouse. The CUBE can be resized or deformed by moving its corner by the mouse.
Note: The texture mapping is implemented using the inverse mapping approach (do not use OpenGL texture mapping function)

cs560-computer-graphics-barycentric-interpolation's People

Contributors

tyh2333 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.