Code Monkey home page Code Monkey logo

computer-graphics's Introduction

Computer-Graphics

A repository for all OpenGL code... being updated gradually

Lab 1

  • Created my first OGL program.
  • Learned to create a window, and set a window size and position.
  • Learned to set the background display color.
  • Learned to implement sound files in my program

Lab 2

  • Learned about OpenGL Geometric Primitives.
  • Created my virtual world using GL_POLYGON, GL_TRIANGLES, and GL_LINE_STRIP.
  • I used glColor3f to fill the color of the Triangle and Polygon.

Lab 3

  • Created a FatPaintBrush program with a reshape, keyboard, mouse, motion handler, and Viewport.
  • Successfully ran DinoPolyLine File which takes a .txt/.dat file and displays a Dino.
  • Completed DinoTilling using a for loop creates a new Viewport for each iteration and creates a dino.
  • Completed Dino invert Tilling using nested for loops.
  • Completed Dino Zoom in and out using Keys, which zooms in on the up arrow key zooms out on the down arrow key, and reposts the display with updated value.
  • Completed viewport panning in which the viewport is variable and can be increased and decreased using a mouse or keyboard
  • Created a parametrized Regular polygon and n-gon using lineTo and moveTo functions.
  • Implemented the code for Arc.
  • Implemented the code for Rose Curves.
  • Implemented the code for Rosette (Example from the book).
  • Created a circle using equation: x + rcosØ, y + rsinØ

Lab 4

  • Implemented and created an Arrow using moveTo and lineTo functions.
  • Figure 3.27 rosette
  • Implemented and completed Figure 2.44 menu (attached menu with right mouse button)

Lab 5

  • Created my Paint Program:
  • Learned to render/write text on screen
  • Used vector array to draw dots, clicking the left mouse button will create dots and the right mouse clears the dots (push and pop in array)
  • Created a shape class that is inherited by different shapes like Triangles, circles, pentagons, cylinder
  • Used keyboard handler to render and delete shapes on the screen, on pressing a key a shape is drawn and deleted. (push and pop in vector array)
  • Implemented Point2 class and Turtle Graphics:
  • Example 3.5.2 (motifs)
  • Practice Exercises-> 3.5.1 – 3.5.6 (motifs and meanders)
  • Practice Exercises-> 3.5.7 – 3.5.9 (Polyspirals)

Lab 6

  • Created a Mario 2D game, learned about RGBApixmap, Enum datatype, reading a bmp file, setting a chromakey, Special keyboard functions and how to move a bmp on screen using keyboard interactions.

Lab 7

  • Canvas Class implementation with some more classes including Point2, IntRect, and RealRect.
  • Created my own 3 functions drawSun(), drawStar(), and drawSmiley() using Canvas Class.

Lab 8

  • Spider game lab:
  • Physics engine to check collision between spider & bullet.
  • Bounce back logic of the spider if it reaches the wall of the window.
  • Object modeling Bullet.
  • Use of the gettime() function to determine the speed of the spider at each point second.

Lab 9

  • Usage of 2D transformations
  • Usage of push & pop matrix for transformations of windmill blade
  • Timer Function which increments the value of the angle so the windmill keeps rotating.
  • Plane (object) landing using the Timer function.

Lab 10

  • Using Transformations to create flakes and a star.
  • Dino transformations.

Lab 11

  • Modeling and animating a gear wheel.
  • Drawing a symmetric object (snowflake) using a Turtle.

Lab 12

  • Model a 2D car using transformations and animate it using the Timer function, attached menu to start, restart & exit the program.
  • Example of a 2D robot for hierarchical modeling, by using these solutions:
  • Independent / Non – hierarchical
  • Dependent / Hierarchical.

Lab 13

  • Example 5.6.2: A scene composed of wireframe objects.
  • Example 5.6.3. A 3D scene rendered with shading.

computer-graphics's People

Contributors

umershaikh123 avatar zainasif767 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

umershaikh123

computer-graphics's Issues

Test issue

This issue is just for test purposes.

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.