0% found this document useful (0 votes)
28 views5 pages

2 Marks

Uploaded by

poorvaja.r
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)
28 views5 pages

2 Marks

Uploaded by

poorvaja.r
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/ 5

1. Tell the use of gluLookAt function in OpenGLwith syntax.

In OpenGL, the gluLookAt function specifies a viewing transformation that defines the
position of the viewer, the direction the viewer is looking, and the up direction for the
viewer. The syntax for gluLookAt is as follows:
void gluLookAt(
GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ,
GLdouble centerX, GLdouble centerY, GLdouble centerZ,
GLdouble upX, GLdouble upY, GLdouble upZ
);

The eyeX, eyeY, and eyeZ parameters specify the position of the viewer, while the centerX,
centerY, and centerZ parameters specify the point that the viewer is looking at. The upX,
upY, and upZ parameters specify the up direction for the viewer.

For example, to specify a viewing transformation that places the viewer at the origin,
looking down the positive z-axis, with the y-axis as the up direction, you could call
gluLookAt like this:

gluLookAt(0, 0, 0, 0, 0, 1, 0, 1, 0);

2. What is back face culling in OpenGL?


Back face culling is a technique used in computer graphics to optimize the rendering of
3D scenes by discarding polygons that are not facing the viewer. This can be particularly
useful when rendering complex 3D models with a large number of polygons, as it
reduces the number of polygons that need to be processed and rendered.

In OpenGL, back face culling is controlled by the GL_CULL_FACE state. To enable back
face culling, you can call the glEnable function with the GL_CULL_FACE parameter:

glEnable(GL_CULL_FACE);
glCullFace(GL_BACK);

This will cause all polygons with their normal vector pointing away from the viewer to be
culled, leaving only those facing the viewer to be rendered. You can also specify
GL_FRONT to cull polygons facing away from the viewer, or GL_FRONT_AND_BACK to disable
back face culling altogether.
3. List some applications of Computer Vision.

1. Image and video processing: Computer vision techniques are widely used to
process and analyze images and video, such as for object recognition, facial
recognition, and image enhancement.
2. Surveillance and security: Computer vision systems can be used to monitor and
track people and objects in real-time, and to detect suspicious activity or
potential threats.
3. Transportation: Computer vision is used in a variety of transportation
applications, such as autonomous vehicles, traffic monitoring and control, and
pedestrian and object detection for safety.
4. Medicine: Computer vision is being used to analyze medical images, such as
X-rays and CT scans, for diagnosis and treatment planning, as well as to assist in
surgery.
5. Agriculture: Computer vision is used to monitor crop health, detect pests and
diseases, and optimize irrigation and fertilization.

4. How AI is used in the Game development?


Artificial intelligence (AI) can be used in various ways in game development to create
more realistic and immersive gameplay experiences. Here are a few examples of how AI
is used in games:

1. Non-player character (NPC) behavior: AI can be used to control the behavior and
actions of NPCs, such as enemies, allies, and civilian characters. For example,
NPC characters might use pathfinding algorithms to navigate around the game
world and avoid obstacles, or use decision-making algorithms to choose
appropriate actions in response to player actions or the state of the game.
2. Opponent intelligence: In games with competitive elements, AI can be used to
control the behavior of opponents, such as in turn-based strategy games or
real-time strategy games. Opponent AI might use machine learning algorithms to
learn from player actions and adapt its strategies over time.
3. Game world simulation: AI can be used to simulate and control the behavior of
elements in the game world, such as weather patterns, animal behaviors, and
physical phenomena.
4. Decision-making: AI can be used to help players make decisions by providing
recommendations or suggestions based on the current state of the game.
5. What is the role of process manager in game logic?
In game development, a process manager is a system that is responsible for managing
and executing processes or tasks that are part of the game logic.

The process manager is responsible for scheduling and prioritizing these tasks, as well
as handling dependencies between tasks and coordinating their execution.

The role of the process manager in game logic is to ensure that the game runs smoothly
and efficiently by organizing and executing the various processes and tasks that are
needed to update the game state and render the game world.

This might include tasks such as physics simulations, AI decision-making, animation,


and rendering.

6. List some Geometric transformations used in 3D graphics.


In 3D graphics, geometric transformations are used to modify the position, orientation,
and shape of 3D objects in the scene. Here are some common geometric
transformations that are used in 3D graphics:

1. Translation: Translation moves an object by a certain distance in a specific


direction. It is often used to position objects in the scene or to animate their
movement.
2. Rotation: Rotation changes the orientation of an object by rotating it around a
specific axis. It is often used to rotate objects in the scene or to animate their
rotation.
3. Scaling: Scaling changes the size of an object by stretching or shrinking it along
one or more axes. It is often used to resize objects in the scene or to animate
their growth or shrinkage.
4. Shearing: Shearing distorts an object by stretching or skewing it along one or
more axes. It is often used to create perspective effects or to deform objects in
the scene.
5. Reflection: Reflection flips an object across a plane, creating a mirror image of
the original object. It is often used to create symmetry or to create reflections in
mirrors or other reflective surfaces.
7. Define frustum in perspective projection.
In 3D graphics, a frustum is the part of a 3D scene that is visible from the viewpoint of
the camera.

It is defined by a pyramid-shaped volume in 3D space, with the apex at the viewpoint


and the base representing the viewable area of the scene.

In perspective projection, the frustum is defined by the field of view (FOV) of the camera,
which determines the angle of the viewable area.

The FOV can be specified in terms of the vertical field of view (VFOV) or the horizontal
field of view (HFOV), depending on the aspect ratio of the viewport.

The frustum is used to determine which objects in the scene are visible from the
camera's perspective and should be rendered. Objects outside the frustum are clipped
and not rendered, which can improve performance by reducing the number of polygons
that need to be processed and drawn.

8. What is Heuristic Planning?


Heuristic planning is a type of artificial intelligence (AI) that involves using heuristics, or
rules of thumb, to find approximate solutions to problems.

It is used in situations where finding an optimal solution is computationally infeasible, or


where the problem is too complex to be solved exactly.

Heuristic planning algorithms typically involve constructing a search tree of potential


solutions, and then using heuristics to guide the search and prune the tree.

The heuristics used might be based on domain-specific knowledge, or they might be


learned from data.

Heuristic planning algorithms are often used in AI applications such as robotics, natural
language processing, and computer games.

9. What is transposition table?


A transposition table is a data structure used in computer chess programs and other
search-based artificial intelligence (AI) applications to store and retrieve partial search
results.
It is used to avoid recalculating positions and moves that have already been searched,
and to prune the search tree by eliminating branches that are known to be suboptimal.

A transposition table is typically implemented as a hash table, which maps search


positions to partial search results. The search results stored in the transposition table
might include the depth of the search, the evaluation of the position, and the best move
found so far.

The transposition table is used to accelerate the search process by allowing the AI to
quickly retrieve partial search results for positions that have already been searched,
rather than starting the search from scratch. This can significantly reduce the time and
resources required to find a solution, especially in complex search problems with a large
search space.

You might also like