0% found this document useful (0 votes)
13 views31 pages

CG Report

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views31 pages

CG Report

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

Computer Graphics and Image Processing

CHAPTER 1

INTRODUCTION

In today’s era of the internet majority of the communications happens through the client-server
architecture model. All online transactions such as browsing the web, shopping on e-commerce
portals, online banking transactions, etc are made possible through communication between the
client i.e. the user of a service and the server. This process of communication is not as simple as
explained above.

Clients and servers exchange messages in a request–response messaging pattern. The client
initiates a request to the server and the server returns a response. This exchange of messages is an
example of interprocess communication. To start the actual communication between the client and
server, first a connection has to be established between the client and server through an interface
called socket. Once the connection is set up, the client and server exchange messages through this
socket. To communicate, the computers must have a common language, and they must follow
rules so that both the client and the server know what to expect. The language and rules of
communication are defined in a communications protocol.

The exchange of messages between the client and server is in the form of data packets . Bytes are
grouped together to form a data packet. Apart from the actual message the data packets also contain
additional information such as source and destination address, protocol and its version, error
control information, etc. This architecture allows for efficient data management and resource
allocation by centralizing critical functions on the server, which can handle complex processing
and large-scale data storage.

Clients manage user interactions and send specific requests to the server, which processes these
requests and sends back appropriate responses. The client-server architecture is highly scalable,
as it can accommodate more clients by scaling the server’s capabilities or adding additional
servers. This design is prevalent in various applications, including web services, database
management, and email systems, providing a robust framework for developing and managing
complex, distributed systems efficiently.

Dept of CSE, SEACET 2023-24 Page 1


Computer Graphics and Image Processing

Key Components of the Client Server Architecture project include:

 Client: The client is a device or application that requests services or resources from the
server. It initiates communication with the server and processes the results returned by the
server.

 Server: The server is a powerful machine or application that provides services or resources
to clients. It processes client requests, performs the necessary computations or data retrieval,
and sends back the appropriate responses.

 Network: The network facilitates communication between clients and servers. It enables
data exchange using various protocols and ensures reliable connectivity.

 Protocols: Protocols are standardized rules that govern data transmission and
communication between clients and servers. They ensure that data is transmitted in a secure,
reliable, and understood manner.

 Middleware: Middleware is software that acts as an intermediary between clients and


servers. It provides additional functionalities like authentication, logging, message queuing,
and transaction management.

 Database: A database is a structured collection of data stored on the server. It stores and
manages data that clients request, ensuring data consistency, integrity, and security.

 User Interface (UI): The UI is the part of the client application that interacts with the user.
It provides a means for users to input data and view results returned by the server.

 Application Logic: Application logic refers to the code and algorithms that define the
application’s functionality. It processes user inputs, interacts with the server, and manages
the flow of data between the client and the server

Dept of CSE, SEACET 2023-24 Page 2


Computer Graphics and Image Processing

1.1 OBJECTIVES

The objectives of client-server architecture in computer graphics include:

1. Resource Sharing: Efficiently share resources such as graphics processing units (GPUs), data,

and applications across multiple clients.

2. Scalability: Enable the system to handle an increasing number of clients and workloads

without performance degradation.

3. Centralized Management: Simplify administration, updates, and maintenance by managing

software, data, and resources centrally on the server.

4. Cost Efficiency: Reduce costs by consolidating hardware and software resources, allowing

multiple clients to access and use shared resources.

5. Enhanced Performance: Offload intensive computations and rendering tasks to powerful

server-side hardware, improving performance for clients with less powerful hardware.

6. Security: Centralize security measures to protect data, applications, and resources, and control

access to sensitive information.

7. Collaboration: Facilitate collaborative work by allowing multiple clients to access and

interact with the same graphics resources and applications in real-time.

8. Reliability and Availability: Improve system reliability and availability by implementing

robust server-side solutions, backups, and failover mechanisms.

9. Data Consistency: Ensure data consistency and integrity by maintaining a single source of

truth on the server.

10. Load Balancing: Distribute workloads across multiple servers to optimize resource utilization

and prevent any single server from becoming a bottlene

Dept of CSE, SEACET 2023-24 Page 3


Computer Graphics and Image Processing

1.2 SCOPE :

The existing system of displaying a simulated system of client server simulations has always been
flawed because of its inability to display a simulated GUI. It has always been unable to convey a
convincing display about the packet transfer and the receiving party and also to know where the
packets and data is being sent to the server.

Our system covers the existing in the way that only the necessary and essential transfers are noted
and also the actual details of the packets being sent are noted. This will help a person understand
what is happening in a network without understanding the technical details in the network. This
system can be used for educational purposes to teach and explain the working of client and server
and network programming.

1.3 STATEMENT :

The aim of the simulation is to provide a graphical interface to a user to show how exactly client
server simulation in a network happens. This should allow the user to understand how exactly
communication happens between client server in a network. So the user should be able see how
the commands are sent from client to server and how the responses happen. The user should
understand how the packets in a network travel from the Client to the Server. The various functions
such as retrieve, store and list should also be visualised in real time.

1.4 LIMITATION :

Our system provides insight into data being sent across client and server and how exactly
communication happens. While the packet transfer to the different components of the client and
server is shown, this does not show what exactly is contained inside the packets and how the
packets are routed. It does not explain how the data is encapsulated inside a data packet or what
exactly the commands are and the internet protocol used is also left unexplained for now.

Dept of CSE, SEACET 2023-24 Page 4


Computer Graphics and Image Processing

CHAPTER 2

LITERATURE SURVEY

2.1 COMPUTER GRAPHICS:

Graphics provides one of the most natural means of communicating within a computer, since our
highly developed 2D and 3D pattern-recognition abilities allow us to perceive process pictorial
data rapidly and effectively. Interactive computer graphics is the most important means of
producing pictures since the invention of photography and television. It has the added advantage
that, with the computer, we can make pictures not only of concrete real world objects but also of
abstract, synthetic objects, such as mathematical surfaces and of data that have no inherent
geometry, such as survey results. Computer graphics started with the display of data on hardcopy
plotters and cathode ray tube screens soon after the introduction of computers themselves. It has
grown to include the creation, storage, and manipulation of models and images of objects. These
models come from a diverse and expanding set of fields, and include physical, mathematical,
engineering, architectural, and even conceptual structures, natural phenomena, and so on.
Computer graphics today is largely interactive. The user controls the contents, structure, and
appearance of the objects and of their displayed images by using input devices, such as keyboard,
mouse, or touch-screen. Due to close relationships between the input devices and the display, the
handling of such devices is included in the study of computer graphics. The advantages of the
interactive graphics are many in number. Graphics provides one of the most natural means of
communicating with a computer, since our highly developed 2D and 3D patter-recognition abilities
allow us to perceive and process data rapidly and efficiently. In many design, implementation, and
construction processes today, the information pictures can give is virtually indispensable.
Scientific visualization became an important field in the 1980s when the scientists and engineers
realized that they could not interpret the prodigious quantities of data produced in supercomputer
runs without summarizing the data and highlighting trends and phenomena in various kinds of
graphical representations.

Dept of CSE, SEACET 2023-24 Page 5


Computer Graphics and Image Processing

2.2 OPENGL INTERFACE:

OpenGL is an application program interface (API) offering various functions to implement


primitives, models and images. This offers functions to create and manipulate render lighting,
coloring, viewing the models. OpenGL offers different coordinate system and frames. OpenGL
offers translation, rotation and scaling of objects. Most of our applications will be designed to
access OpenGL directly through functions in three libraries. They are:

 Main GL: Library has names that begin with the letter gl and are stored in a library usually
referred to as GL.
 OpenGL Utility Library (GLU): This library uses only GL functions but contains code
for creating common objects and simplifying viewing.
 OpenGL Utility Toolkit (GLUT): This provides the minimum functionality that should
be accepted in any modern windowing system.

2.3 OPENGL OVERVIEW:

 OpenGL (Open Graphics Library) is the interface between a graphic program and graphics
hardware. It is streamlined. In other words, it provides low-level functionality. For
example, all objects are built from points, lines and convex polygons. Higher level objects
like cubes are implemented as six four-sided polygons.
 OpenGL supports features like 3-dimensions, lighting, anti-aliasing, shadows, textures,
depth effects, etc.
 It is system-independent. It does not assume anything about hardware or operating system
and is only concerned with efficiently rendering mathematically described scenes. As a
result, it does not provide any windowing capabilities.
 It is a state machine. At any moment during the execution of a program there is a current
model transformation.
 It is a rendering pipeline. The rendering pipeline consists of the following steps: o Defines
objects mathematically.

Dept of CSE, SEACET 2023-24 Page 6


Computer Graphics and Image Processing

Graphics provides one of the most natural means of communicating with a computer, since our
highly developed 2D and 3D pattern-recognition abilities allow us to perceive and process pictorial
data rapidly and efficiently. Interactive computer graphics is the most important means of
producing pictures since the invention of photography and television. It has the added advantage
that, with the computer, we can make pictures not only of concrete real world objects but also of
abstract, synthetic objects, such as mathematical surfaces and of data that have no inherent
geometry, such as survey results.

OpenGL (open graphics library) is a standard specification defining a cross language cross
platform API for writing applications that produce 2D and 3D computer graphics. OpenGL was
developed by silicon graphics Inc. (SGI) in 1992 and is widely used in CAD, virtual reality,
scientific visualization, information visualization and flight simulation. It is also used in video
games.

OpenGL serves two main purpose:

 To hide the complexities of interfacing with different 3D accelerators, by presenting


programmer with a single, uniform API
 To hide the differing capabilities of hardware platforms, by requiring that all
Implementations support the full OpenGL, feature set.

OpenGL has historically been influential on the development of 3D accelerator, promoting a base
level of functionality that is now common in consumer level hardware:

 Rasterized points, lines and polygons are basic primitives.

 A transform and lighting pipeline.

 Z buffering.

 Texture Mapping, Alpha, Blending.

Dept of CSE, SEACET 2023-24 Page 7


Computer Graphics and Image Processing

2.4 CLIENT – SERVER ARCHITECTURE:

Clients and servers exchange messages in a request–response messaging pattern. The client sends
a request, and the server returns a response. This exchange of messages is an example of inter-
process communication. To communicate, the computers must have a common language, and they
must follow rules so that both the client and the server know what to expect. The language and
rules of communication are defined in a communications protocol. All client-server protocols
operate in the application layer. The application layer protocol defines the basic patterns of the
dialogue. To formalize the data exchange even further, the server may implement an application
programming interface (API). The API is an abstraction layer for accessing a service. By restricting
communication to a specific content format, it facilitates parsing. By abstracting access, it
facilitates cross-platform data exchange.

A server may receive requests from many distinct clients in a short period of time. A computer can
only perform a limited number of tasks at any moment, and relies on a scheduling system to
prioritize incoming requests from clients to accommodate them. To prevent abuse and maximize
availability, server software may limit the availability to clients. Denial of service attacks are
designed to exploit a server's obligation to process requests by overloading it with excessive
request rates.

The client–server model does not dictate that server-hosts must have more resources than client-
hosts. Rather, it enables any general-purpose computer to extend its capabilities by using the shared
resources of other hosts. Centralized computing, however, specifically allocates a large amount of
resources to a small number of computers. The more computation is offloaded from client-hosts
to the central computers, the simpler the client-hosts can be.

Dept of CSE, SEACET 2023-24 Page 8


Computer Graphics and Image Processing

CHAPTER 3

REQUIREMENT SPECIFICATIONS

3.1 HARDWARE REQUIREMENTS:

For simple arithmetic operations and basic functionalities:

 Processor: Any modern CPU, including low-end processors like Intel Celeron or AMD
Athlon.
 RAM: 1 GB or more.
 Storage: Minimal storage space, typically less than 100 MB.
 Display: A basic screen with a minimum resolution of 800x600 pixels.
 Input Device: Keyboard and mouse or touch screen.

3.2 SOFTWARE REQUIREMENTS:

This client server architecture has been designed for WINDOWS. OpenGL libraries are used and
hence Eclipse is required.

Development Platform: WPS(Windows Presentation Foundation)

Language : C++

Tool : Eclipse

Library : OpenGL

Dept of CSE, SEACET 2023-24 Page 9


Computer Graphics and Image Processing

CHAPTER 4

SYSTEM ANALYSIS

System analysis of client-server architecture in computer graphics involves evaluating the


components, workflows, and interactions within the architecture. Here are the key aspects to
consider:

Architecture Components

 Clients: Devices or applications requesting services, often with a graphical user interface
(GUI) for user interaction.
 Servers: Centralized systems providing resources, services, or data processing capabilities.
 Network: The medium enabling communication between clients and servers, often the
internet or a local area network (LAN).

Communication Protocols

 Request/Response Model: Clients send requests for resources or data, and servers respond
with the required information.
 State Management: Handling sessions and maintaining state information across multiple
interactions.

Data Flow and Processing

 Data Input: Clients capture user inputs or data, which are sent to the server for processing.
 Data Processing: Servers handle intensive computations, rendering tasks, and data
manipulations.

Dept of CSE, SEACET 2023-24 Page 10


Computer Graphics and Image Processing

Performance Analysis

 Latency: Measure the time taken for data to travel between clients and servers, including
network delays and processing times.
 Throughput: Evaluate the amount of data processed and transmitted within a given
timeframe.
 Load Balancing: Assess mechanisms for distributing workloads across multiple servers
to prevent bottlenecks.

Scalability

 Horizontal Scaling: Adding more servers to handle increased load.


 Vertical Scaling: Enhancing the capacity of existing servers (e.g., upgrading hardware).

Security

 Authentication and Authorization: Ensuring only authorized clients can access server
resources.
 Encryption: Protecting data in transit between clients and servers.
 Firewalls and Intrusion Detection: Safeguarding servers from unauthorized access and
cyber threats.

Reliability and Redundancy

 Failover Mechanisms: Automatic switchover to backup servers in case of failures.


 Data Backup and Recovery: Regular backups and recovery plans to prevent data loss.

Dept of CSE, SEACET 2023-24 Page 11


Computer Graphics and Image Processing

User Experience

 Responsiveness: Ensuring quick feedback and minimal lag for client interactions.
 Consistency: Providing a uniform experience across different clients and sessions.

Development and Maintenance

 Modularity: Designing systems with interchangeable components to simplify updates and


maintenance.
 Version Control: Managing different versions of client and server software for
compatibility.

Use Cases and Scenarios

 Real-time Rendering: Applications like gaming or simulations requiring high-


performance graphics rendering.
 Collaborative Design: Tools enabling multiple users to work on the same graphic projects
simultaneously.
 Remote Visualization: Systems allowing users to visualize complex graphics from remote
locations without needing high-end local hardware.

By analyzing these aspects, one can design, implement, and maintain a robust and efficient client-
server architecture tailored to the specific needs of computer graphics applications.

Dept of CSE, SEACET 2023-24 Page 12


Computer Graphics and Image Processing

CHAPTER 5

DESIGN

System Architecture Overview

 Client Tier: User devices (PCs, tablets, smartphones) running the client application.
 Server Tier: Centralized servers providing rendering, data management, and other services.
 Network Tier: The communication layer connecting clients to servers, typically via the
internet or a local area network (LAN).

Client Components

 User Interface (UI): Graphical User Interface (GUI) for user interaction. Input handling
for user commands, gestures, and interactions.
 Networking Module: Handles communication with the server using protocols like HTTP,
WebSockets, or custom protocols. Manages request/response cycles, including error
handling and retries.
 Rendering Engine: Local rendering for simple tasks or pre-visualization. Receives
rendered frames from the server for display.
 Data Management: Local caching of data for offline access and reduced latency.
Synchronization with server data.

Server Components

 Application Server: Manages client requests and overall application logic. Handles user
authentication, session management, and authorization.
 Rendering Server: Dedicated server or cluster for high-performance rendering tasks.
Utilizes GPUs and specialized hardware for efficient rendering.

Dept of CSE, SEACET 2023-24 Page 13


Computer Graphics and Image Processing

 Data Server: Stores and manages user data, graphical assets, and project files. Implements
database management systems (DBMS) for structured data storage.
 Collaboration Server: Manages real-time collaboration features, such as shared
workspaces and version control. Supports communication tools like chat and annotations.

Network Design

 Communication Protocols: RESTful APIs for standard requests and responses.


WebSockets for real-time communication and updates. Secure communication using
TLS/SSL.
 Load Balancing: Distributes client requests across multiple servers to prevent overload.
Uses techniques like round-robin, least connections, or IP hash.

5.1 ARCHITECTURE DESIGN:

The system consists of a client and server which send commands over a network and a resulting
handshaking occurs. After a handshake there is an exchange of packets that occurs.

Dept of CSE, SEACET 2023-24 Page 14


Computer Graphics and Image Processing

5.2 COMPONENT DESIGN:

The client and server consist of several functions before handshaking, these functions determine
the connections and the commands sent between the client and server.

5.3 BEHAVIOURAL DESIGN:

The client server typically follows the TCP/IP model where the socket is above the transport layer
in both client and server. This helps in sending commands over a network.

Dept of CSE, SEACET 2023-24 Page 15


Computer Graphics and Image Processing

CHAPTER 6
IMPLEMENTATION

This project is implemented using C++ as the programming language. The graphics library used
is OpenGL. Integrated Development Environment (IDE) used is Eclipse.

OpenGL :

Open Graphics Library (OpenGL) is a cross-language, cross-platform application programming


interface (API) for rendering 2D and 3D vector graphics. The API is typically used to interact with
a graphics processing unit (GPU), to achieve hardware-accelerated rendering. OpenGL has
become the industry's most widely used and supported 2D and 3D graphics application
programming interface (API), bringing thousands of applications to a wide variety of computer
platforms. OpenGL fosters innovation and speeds application development by incorporating a
broad set of rendering, texture mapping, special effects, and other powerful visualization functions.
Developers can leverage the power of OpenGL across all popular desktop and workstation
platforms, ensuring wide application deployment.

Eclipse :

Eclipse is a free, open-source cross-platform IDE that supports multiple compilers including GCC
and Visual C++. It is developed in C++ using Widgets as the Graphical User Interface(GUI)
toolkit. Using a plugin architecture, its capabilities and features are defined by the provided
plugins. Currently, Eclipse is oriented towards C, C++ .

Client Server Simulation:


START -
The client sends a command to the server, the server in turn responds to the client with a response.
This means that a three-way handshake has taken place between the client and server. This only
tells us that client and server know and authenticate each other.Now the client send the data or
files to the server in the form of data packets through the network.

Dept of CSE, SEACET 2023-24 Page 16


Computer Graphics and Image Processing

RETRIVE –

The client sends a retrieve command (RETR) to the server to retrieve or fetch a data or file it
wants. The server responds back to the client by sending the data packet requested by it.

STORE –

When the client wants to store some data in the server it sends STR command to the server. This
lets the server know that the data it receives has to be saved. Then the client sends the data to be
stored as a data packet to the server, the server on receiving it saves it as it knows it has to be
saved.

LIST –

When the client wants to know to information about its data stored in the server, it sends a LIST
command to the server. The server responds with the list data packets of the client that it has
been stored.

EXIT –
This exits and closes the client – server simulation running.

Dept of CSE, SEACET 2023-24 Page 17


Computer Graphics and Image Processing

CHAPTER 7
TESTING

Testing a client-server architecture in computer graphics using OpenGL involves multiple steps to
ensure that the client can send data to the server, the server can process this data, and then send
the appropriate response back to the client. Here's a simple example in C++ using OpenGL for the
graphics part and sockets for the networking part.

1. Setting Up the Server

The server will listen for connections from clients and respond with some data. Here's a basic
example:

#include <iostream>
#include <cstring>
#include <unistd.h>
#include <netinet/in.h>

#define PORT 8080

int main() {
int server_fd, new_socket;
struct sockaddr_in address;
int addrlen = sizeof(address);
char buffer[1024] = {0};
const char *hello = "Hello from server";

// Creating socket file descriptor


if ((server_fd = socket(AF_INET, SOCK_STREAM, 0)) == 0) {
perror("socket failed");

Dept of CSE, SEACET 2023-24 Page 18


Computer Graphics and Image Processing

exit(EXIT_FAILURE);
}

address.sin_family = AF_INET;
address.sin_addr.s_addr = INADDR_ANY;
address.sin_port = htons(PORT);

// Bind the socket to the network address and port


if (bind(server_fd, (struct sockaddr *)&address, sizeof(address)) < 0) {
perror("bind failed");
close(server_fd);
exit(EXIT_FAILURE);
}

// Listen for incoming connections


if (listen(server_fd, 3) < 0) {
perror("listen");
close(server_fd);
exit(EXIT_FAILURE);
}

// Accept an incoming connection


if ((new_socket = accept(server_fd, (struct sockaddr )&address, (socklen_t)&addrlen)) < 0)
{
perror("accept");
close(server_fd);
exit(EXIT_FAILURE);
}

// Read data from the client


read(new_socket, buffer, 1024);

Dept of CSE, SEACET 2023-24 Page 19


Computer Graphics and Image Processing

std::cout << "Message from client: " << buffer << std::endl;

// Send data to the client


send(new_socket, hello, strlen(hello), 0);
std::cout << "Hello message sent" << std::endl;

close(new_socket);
close(server_fd);
return 0;
}

2. Setting Up the Client

The client will connect to the server, send some data, and then wait for a response:

#include <iostream>
#include <cstring>
#include <unistd.h>
#include <arpa/inet.h>

#define PORT 8080

int main() {
int sock = 0;
struct sockaddr_in serv_addr;
const char *hello = "Hello from client";
char buffer[1024] = {0};

// Create socket
if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
std::cout << "Socket creation error" << std::endl;

Dept of CSE, SEACET 2023-24 Page 20


Computer Graphics and Image Processing

return -1;
}

serv_addr.sin_family = AF_INET;
serv_addr.sin_port = htons(PORT);

// Convert IPv4 and IPv6 addresses from text to binary form


if (inet_pton(AF_INET, "127.0.0.1", &serv_addr.sin_addr) <= 0) {
std::cout << "Invalid address/ Address not supported" << std::endl;
return -1;
}

// Connect to the server


if (connect(sock, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0) {
std::cout << "Connection Failed" << std::endl;
return -1;
}

// Send data to the server


send(sock, hello, strlen(hello), 0);
std::cout << "Hello message sent" << std::endl;

// Read data from the server


read(sock, buffer, 1024);
std::cout << "Message from server: " << buffer << std::endl;

close(sock);
return 0;
}

Dept of CSE, SEACET 2023-24 Page 21


Computer Graphics and Image Processing

3. Integrating OpenGL

To integrate OpenGL for rendering purposes, you will need to add the necessary OpenGL code
to the client. Here’s an example:

#include <GL/glut.h>
#include <iostream>
#include <cstring>
#include <unistd.h>
#include <arpa/inet.h>

#define PORT 8080

int sock = 0;
char server_message[1024] = {0};

void display() {
glClear(GL_COLOR_BUFFER_BIT);

// Example: draw a simple triangle


glBegin(GL_TRIANGLES);
glVertex2f(-0.5f, -0.5f);
glVertex2f(0.5f, -0.5f);
glVertex2f(0.0f, 0.5f);
glEnd();

glutSwapBuffers();
}

void setupSocket() {
struct sockaddr_in serv_addr;

Dept of CSE, SEACET 2023-24 Page 22


Computer Graphics and Image Processing

const char *hello = "Hello from OpenGL client";

// Create socket
if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
std::cout << "Socket creation error" << std::endl;
exit(-1);
}

serv_addr.sin_family = AF_INET;
serv_addr.sin_port = htons(PORT);

// Convert IPv4 and IPv6 addresses from text to binary form


if (inet_pton(AF_INET, "127.0.0.1", &serv_addr.sin_addr) <= 0) {
std::cout << "Invalid address/ Address not supported" << std::endl;
exit(-1);
}

// Connect to the server


if (connect(sock, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0) {
std::cout << "Connection Failed" << std::endl;
exit(-1);
}

// Send data to the server


send(sock, hello, strlen(hello), 0);
std::cout << "Hello message sent" << std::endl;

// Read data from the server


read(sock, server_message, 1024);
std::cout << "Message from server: " << server_message << std::endl;
}

Dept of CSE, SEACET 2023-24 Page 23


Computer Graphics and Image Processing

int main(int argc, char **argv) {


setupSocket();

glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);
glutInitWindowSize(800, 600);
glutCreateWindow("OpenGL Client");
glutDisplayFunc(display);
glutMainLoop();

close(sock);
return 0;
}

Dept of CSE, SEACET 2023-24 Page 24


Computer Graphics and Image Processing

CHAPTER 8
SNAPSHOTS

Fig 8.1 Client Server Architecture

Fig 8.2 Handshake Process

Dept of CSE, SEACET 2023-24 Page 25


Computer Graphics and Image Processing

Fig 8.3 Uploading data

Fig 8.4 Downloading data

Dept of CSE, SEACET 2023-24 Page 26


Computer Graphics and Image Processing

Fig 8.5 Overall connection of client server architecture

Dept of CSE, SEACET 2023-24 Page 27


Computer Graphics and Image Processing

CONCLUSION

The users of this client server simulation will be able to view content as it takes place in the client
– server network. The fully functional system as per the functional requirements is ready for
deployment. It will be used share study materials at the institutional level and later will be made
open for public to use. Testing of the application is done to ensure its integrity and reliability.
The simulation serves to provide a simulation where the users can see the data packets as they
move between the client and server within a given network. This can be used for educational
purposes where the students can learn about what exactly happens in TCP communication. This
also saves work for the professor or faculty who have an interest or work in computer networks in
general. The simulation allows users to visualize the many aspects of network communication
including the different functions such retrieve, store and list which cannot be explained very easily
to first timers.
A graphical representation with different colors used to explain the various aspects of the
components and their working saves several hours of time and effort spent in explaining the
concepts and improves the overall lecture instead of explaining it on a board or paper. This helps
the user or student understand networks and how the PC connects to the internet in general.

Dept of CSE, SEACET 2023-24 Page 28


Computer Graphics and Image Processing

FUTURE ENHANCEMENTS

1. Visualization of content inside the data packets.

2. Explanation of routing through the network using different network devices such as router,
hub, gateway, etc.
3. Connectivity in the network.

4. Visualization of further concepts such as peer – to – peer.

5. Visualization of protocols used in networks.

Dept of CSE, SEACET 2023-24 Page 29


Computer Graphics and Image Processing

REFERENCES

1. https://www.opengl.org/

2. https://stackoverflow.com/

3. https://www.britannica.com/technology/client-server-architecture

4. https://www.ntu.edu.sg/home/ehchua/programming/opengl/CG_Introduction.html

5. Donald Hearn & Pauline Baker: Computer Graphics with OpenGL Version, 3rd Edition,
Pearson Education,201.
6. Edward Angel: Interactive Computer Graphics- A Top Down approach with OpenGL, 5th
edition Pearson Education, 2008.

Dept of CSE, SEACET 2023-24 Page 30


Computer Graphics and Image Processing

Dept of CSE, SEACET 2023-24 Page 31

You might also like