The document discusses computer graphics and summarizes various graphics programming concepts in C, including:
- Two standard output modes: text and graphics mode, which allows pixel manipulation.
- Graphics library functions defined in "graphics.h" header file for drawing shapes, text and manipulating pixels.
- Coordinate representation on screen with origin at upper left corner.
- Initialization of graphics mode using initgraph() and cleanup with closegraph().
- Functions for drawing lines, circles, rectangles, text and filling areas with patterns.
- Algorithms like DDA, Bresenham and midpoint circle/ellipse for drawing shapes.
Comprehensive coverage of fundamentals of computer graphics.
3D Transformations
Reflections
3D Display methods
3D Object Representation
Polygon surfaces
Quadratic Surfaces
Computer graphics lab report with code in cppAlamgir Hossain
This is the lab report for computer graphics in cpp language. Basically this course is only for the computer science and engineering students.
Problem list:
1.Program for the generation of Bresenham Line Drawing.
2. Program for the generation of Digital Differential Analyzer (DDA) Line Drawing.
3. Program for the generation of Midpoint Circle Drawing.
4. Program for the generation of Midpoint Ellipse Drawing.
5. Program for the generation of Translating an object.
6. Program for the generation of Rotating an Object.
7. Program for the generation of scaling an object.
All programs are coaded in cpp language .
Comprehensive coverage of fundamentals of computer graphics.
3D Transformations
Reflections
3D Display methods
3D Object Representation
Polygon surfaces
Quadratic Surfaces
Computer graphics lab report with code in cppAlamgir Hossain
This is the lab report for computer graphics in cpp language. Basically this course is only for the computer science and engineering students.
Problem list:
1.Program for the generation of Bresenham Line Drawing.
2. Program for the generation of Digital Differential Analyzer (DDA) Line Drawing.
3. Program for the generation of Midpoint Circle Drawing.
4. Program for the generation of Midpoint Ellipse Drawing.
5. Program for the generation of Translating an object.
6. Program for the generation of Rotating an Object.
7. Program for the generation of scaling an object.
All programs are coaded in cpp language .
with today's advanced technology like photoshop, paint etc. we need to understand some basic concepts like how they are cropping the image , tilt the image etc.
In our presentation you will find basic introduction of 2D transformation.
This ppt's introduced Basics of computer graphics, which helps to diploma in computer engineering, DCA BCA, BE computer science student's to improve study in computer graphics.
with today's advanced technology like photoshop, paint etc. we need to understand some basic concepts like how they are cropping the image , tilt the image etc.
In our presentation you will find basic introduction of 2D transformation.
This ppt's introduced Basics of computer graphics, which helps to diploma in computer engineering, DCA BCA, BE computer science student's to improve study in computer graphics.
We are restricted from importing cv2 numpy stats and other.pdfDARSHANACHARYA13
We are restricted from importing cv2, numpy, stats and other third party libraries, with the
only exception of math, importing math library is allowed (import math).
the input image contains objects of four geometric shapes: circle, square, rectangle, and ellipse.
The shapes have a brighter intensity compared to the background. The objective of the
assignment is to count the total number of each geometric shape in the image by performing
binary image processing. The overall steps are
Copmute the histogram
Compute optimal threshold
Create binary image
Perform blob-coloring
For each region, compute area, centroid, and shape (circle, square, rectangle, or ellipse)
Count the number of circles, number of squares, number of rectangles, and number of ellipses.
Mark the center of each region with a label (c for circle, r for rectangle, s for square, and e for
ellipse)
Objective 2: Perform compression using run-length encoding and decoding of a binary image.
Shape Counting:
a. Write a program to binarize a gray-level image based on the assumption that the image has a
bimodal histogram. Determine the optimal threshold required to binarize the image. Your code
should report both the binarized image and the optimal threshold value. Also assume that
background is darker than foreground objects in the input gray-level image.
Starter code available in directory region_analysis/
region_analysis/binary_image.py:
compute_histogram: write your code to compute the histogram in this function, If you return a list it
will automatically save the graph in output folder
find_threshold: Write your code to compute the optimal threshold. This should be implemented
using the iterative algorithm discussed in class (See Week 4, Lecture 7, slide 42 on teams). Do not
implment the Otsu's thresholding method. No points are awarded for Otsu's method.
binarize: write your code to threshold the input image to create a binary image here. This function
should return a binary image which will automatically be saved in output folder. For visualization
one can use intensity value of 255 instead of 1 in the binary image. That way the objects appear
white over black background
Any output images or files will be saved to "output" folder
b. Write a program to perform blob-coloring. The input to your code should be a binary image (0's,
and 255's) and the output should be a list of objects or regions in the image.
region_analysis/shape_counting.py:
blob_coloring: write your code for blob coloring here, takes as input a binary image and returns a
list/dictionary of objects or regions.
Any output images will be saved to "output" folder
c. Ignore shapes smaller than 10 pixels in area generate a report of the remaining regions (region
Number, Centroid, Area, and Shape).
region_analysis/shape_counting.py:identify_shapes: write your code for computing the statistics of
each object/region, i.e area and location (centroid) here, and the shape (c for circle, s for square, r
for rectancle, and e for .
COMPUTER AIDED DESIGN NOTES
THIS SLIDE CONTAINS WHOLE SYLLABUS OF ENGINEERING DRAWING/GRAPHICS. IT IS THE MOST SIMPLE AND INTERACTIVE WAY TO LEARN ENGINEERING DRAWING.SYLLABUS IS RELATED TO rajiv gandhi proudyogiki vishwavidyalaya / rajiv gandhi TECHNICAL UNIVERSITY ,BHOPAL.
This file contains all the practicals with output regarding GTU syllabus. so it will help to IT and Computer engineering students. It is really knowledgeable so refer these for computer graphics practicals.
The original JDK 1.0 had a very simple mechanism for drawing shapes. You select color and paint mode, and call methods of the Graphics class. ThesisScientist.com
Unix and Shell Programming,
Q P Code: 60305.
Additional Mathematics I
Q P Code: 60306
Computer Organization and Architecture
Q P Code: 62303
Data Structures Using C
Q P Code: 60303
Discrete Mathematical Structures
Q P Code: 60304
Engineering Mathematics - III
Q P Code: 60301
Soft Skill Development
Q P Code: 60307
Similar to B. SC CSIT Computer Graphics Lab By Tekendra Nath Yogi (20)
classification algorithms, decision tree, naive bayes, back propagation, KNN,TU, BIM 8th semester Data mining and data warehousing Slide by Tekendra Nath Yogi
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
How to Split Bills in the Odoo 17 POS ModuleCeline George
Bills have a main role in point of sale procedure. It will help to track sales, handling payments and giving receipts to customers. Bill splitting also has an important role in POS. For example, If some friends come together for dinner and if they want to divide the bill then it is possible by POS bill splitting. This slide will show how to split bills in odoo 17 POS.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
Andreas Schleicher presents at the OECD webinar ‘Digital devices in schools: detrimental distraction or secret to success?’ on 27 May 2024. The presentation was based on findings from PISA 2022 results and the webinar helped launch the PISA in Focus ‘Managing screen time: How to protect and equip students against distraction’ https://www.oecd-ilibrary.org/education/managing-screen-time_7c225af4-en and the OECD Education Policy Perspective ‘Students, digital devices and success’ can be found here - https://oe.cd/il/5yV
We all have good and bad thoughts from time to time and situation to situation. We are bombarded daily with spiraling thoughts(both negative and positive) creating all-consuming feel , making us difficult to manage with associated suffering. Good thoughts are like our Mob Signal (Positive thought) amidst noise(negative thought) in the atmosphere. Negative thoughts like noise outweigh positive thoughts. These thoughts often create unwanted confusion, trouble, stress and frustration in our mind as well as chaos in our physical world. Negative thoughts are also known as “distorted thinking”.
2. Introduction
• Two modes of standard output device:
– Text mode:
• Set up display 25 lines of text with 80 characters per line.
• Characters are group of pixels
• But does not facilitates pixel manipulation
– Graphic mode:
• Facilitates pixel manipulation
• To work with graphics, c has various library functions.
• Graphics library functions are defined with in header file “graphics.h”
2By: Tekendra Nath Yogi2/9/2019
3. Contd….
• Representation of co-ordinates on computer screen:
– Each pixel has two coordinates (x,y):
• The horizontal coordinate corresponds to an X-coordinate
• The vertical coordinate corresponds to a Y coordinate
• origin of the coordinates of a computer screen is the upper left
corner.
3By: Tekendra Nath Yogi2/9/2019
4. Contd….
• IDE used:
– To create graphical applications we will use Turbo C++ 3.0 IDE and
the BGI library.
– BGI (Borland Graphics Interface) is a graphics library which provides
several functions which can be used to create graphical applications.
– The header file “graphics.h” will be used to access the functions of this
library.
4By: Tekendra Nath Yogi2/9/2019
6. Contd….
• Graphics mode initialization:
– initgraph() function is used
– Syntax: initgraph(&graphic_driver, &graphics_mode, “path_to_driver”);
– Graphics_driver is a variable which can be any valid identifier specifies the
graphics driver to be used.
– Graphic_mode is also a variable which can be any valid identifier is initialized
to the mode for the particular video adaptor to use.
– The third argument path_to_driver is a string constant the directories
containing .bgi and .char files.
– For automatic initialization DETECT constant is assigned to the graphic_driver
variable.
6By: Tekendra Nath Yogi2/9/2019
7. Contd….
• At the end of our graphics program, we have to unloads the
graphics drivers and sets the screen back to text mode by
calling closegraph() function.
7By: Tekendra Nath Yogi2/9/2019
8. Library functions
• Plotting and getting points:
– putpixel():
• plots a point with specified color
• syntax: putpixel(int x, int y, int color);
– getpixel( ):
• gets color of specified pixel
• Syntax : intger_variable = getpixel( int x, int y);
8By: Tekendra Nath Yogi2/9/2019
9. Contd….
• Example: Program to illustrate the point plotting on the screen
9By: Tekendra Nath Yogi2/9/2019
10. Contd….
• Example: program to illustrate the concept of getpixel()
function:
10By: Tekendra Nath Yogi2/9/2019
11. Contd….
• Color table: the colors available depends on the current
graphics driver and mode.
11By: Tekendra Nath Yogi2/9/2019
12. Contd….
• Changing drawing/foreground and background color:
– Setcolor():
• it change the current drawing color;
• Syntax: setcolor(int color);
– Setbkcolor():
• It change the background color
• Syntax: setbkcolor(int color);
12By: Tekendra Nath Yogi2/9/2019
14. Contd….
• Drawing a line:
– line() function is used to draw line. We will give starting and ending
points of the line.
– Syntax: Line(x1, y1, x2, y2) // draw a line from (x1,y1) to (x2,y2).
14By: Tekendra Nath Yogi2/9/2019
15. Contd….
• Class work: Draw a line by using putpixel( ) function using for
loop.
15By: Tekendra Nath Yogi2/9/2019
17. Contd….
• setlinestyle() function:
– sets the style for all lines drawn.
– setlinestyle(int linestyle, unsigned upattern, int thickness);
17By: Tekendra Nath Yogi2/9/2019
18. Contd….
• linestyle specifies in which of several styles subsequent lines
will be drawn (such as solid, dotted, centered, dashed).
18By: Tekendra Nath Yogi2/9/2019
19. Contd….
• upattern is a 16-bit pattern that applies only if linestyle is
USERBIT_LINE (4).
• thickness specifies whether the width of subsequent lines
drawn will be normal or thick
19By: Tekendra Nath Yogi2/9/2019
21. Contd….
• Draw circle in C graphics
– circle() function which draws a circle with center at (x, y) and given
radius.
– Syntax : circle(x, y, radius);
– where, (x, y) is center of the circle. 'radius' is the Radius of the circle.
– E.g.,
– Class work: change the color of circle outline.
21By: Tekendra Nath Yogi2/9/2019
22. Contd….
• Draw ellipse in C graphics:
– ellipse() function draws a ellipse.
– Syntax: ellipse(int x, int y, int start_angle, int end_angle, int x_radius, int y_radius),
– E.g.,
22By: Tekendra Nath Yogi2/9/2019
23. Contd….
• Drawing arc :
– The function arc( ) is used to draw a arc.
– Syntax: arc(int x, int y, int start_angle, int end_angle, int radius);
– E.g.,
23By: Tekendra Nath Yogi2/9/2019
24. Contd….
• Draw rectangle:
– The rectangle() function is used to draw rectangle
– Syntax: rectangle(int x1, int y1, int x2, int y2);
– E.g.,:
24By: Tekendra Nath Yogi2/9/2019
25. Contd….
• Drawing triangle:
– No function available, so draw triangle as a set of line.
– Idea: line(x1, y1, x2, y2);
line(x3,y3, x4, y4);
line(x5, y5, x6,y6);
25By: Tekendra Nath Yogi2/9/2019
26. Contd….
• Displaying a text in graphics mode:
– Outtext() function to display the string at the current
position
• Syntax: outtext(“Text”);
– Outtextxy()function to display at point(x,y);
• Syntax; outtextxy(x, y, “text”);
26By: Tekendra Nath Yogi2/9/2019
27. Contd….
• setfillstyle() and floodfill() in C:
– setfillstyle(): sets the current fill pattern and fill color.
• syntax: void setfillstyle(int pattern, int color)
– floodfill() : fill an enclosed area.
• Syntax: floodfill(int x, int y, int border_color)
27By: Tekendra Nath Yogi2/9/2019
43. Midpoint circle algorithm
1. Input radius r and circle center (xc, yc) and obtain the first point on the circumference of a
circle centered on the origin as
(x0,y0) = (0,r)
2. Calculate the initial value of the decision parameter as
P0 = 5/4 – r = 1-r
3. At each xk position, starting at k = 0, perform the following test:
If pk < 0, the next point along the circle centered on (0,0) is (xk+1,yk) and
Pk+1 = pk + 2xk+1 + 1
Otherwise, the next point along the circle is (xk+1,yK-1) and
Pk+1 = pk + 2xk+1 + 1 -2yk+1
Where 2xk+1 = 2xk + 2 and 2yk+1 = 2yk-2
4. Determine the symmetry points in the other seven octants.
5. Move each calculated pixel position (x,y) onto the circular path
centered on (xc,yc) and plot the co-ordinate values:
x = x + xc, y = y+yc
6. Repeat steps 3 through 5 until x ≥ y
43By: Tekendra Nath Yogi2/9/2019
52. Area filling
• The process of painting defined area(such as rectangle , circle,
ellipse, etc) with specified color(solid-fill) or pattern(pattern-
fill).
• There are two basic approaches to area filling on raster
systems.
– Scan Fill
– Seed Fill (Boundary Fill, Flood Fill )
52By: Tekendra Nath Yogi2/9/2019