top of page

Search Results

136 results found with an empty search

  • Why is depth-sort algorithm for visible surface determination called painter’s algorithm?

    The painter's algorithm is a technique used in computer graphics to determine which surfaces (or parts of surfaces) of 3D objects are visible from a given viewpoint. The basic idea is to render surfaces in a back-to-front order, so that closer surfaces are painted over farther ones. This ensures that the visible parts of objects are correctly displayed, and hidden parts are not shown. When a painter creates a painting, especially one that depicts a complex scene with overlapping objects, they often paint the background first and then successively paint the foreground objects on top. This process can be broken down into steps: Paint the sky and distant landscape: These are the farthest elements. Paint intermediate objects: Trees, buildings, and other mid-ground elements. Paint the nearest objects: Foreground elements like people, animals, or any objects that are closest to the viewer. By following this sequence, the painter ensures that each new layer covers parts of the previous layers as necessary, creating a realistic depth effect. In computer graphics, the painter's algorithm works in a similar way: Sort all surfaces by their depth: Calculate or determine the distance of each surface from the viewpoint. Render surfaces from back to front: Start with the farthest surfaces and proceed to the nearest. The depth-sort algorithm for visible surface determination is called the "painter's algorithm" because it mimics the technique used by painters to create a sense of depth in their paintings.

  • How to convert RGB color model to CMY color model?

    To convert an RGB color model to a CMY color model, you can use the following formulas. The RGB model is based on additive color mixing, while the CMY model is based on subtractive color mixing. The conversion is straightforward since the two models are complementary. Given RGB values in the range [0, 1], where: - R is the red component - G is the green component - B is the blue component The corresponding CMY values are calculated as: - C = 1 - R - M = 1 - G - Y = 1 - B

  • What is a Polygon Mesh and its representations?

    A polygon mesh is a mathematical representation of a 3D object. It is composed of a set of vertices, edges, and faces that define the shape of the object. A vertex is a single point in 3D space, an edge is a line connecting two vertices, and a face is a closed loop of edges. The faces are usually triangles or quadrilaterals, and can be used to represent curved surfaces or other complex shapes. Polygon Mesh method basically used to represent a broad class of surfaces or solids in computer graphics. It is possible to render a polygonal mesh by applying the hidden surface removal methods as per requirement. So, the polygon mesh can be represented by three ways which are: Explicit representation: The mesh is represented by a list of vertex coordinates. Typically these vertices are grouped into threes. Each group representing a triangle. As discussed, the vertices are stored in counter clockwise order. This representation is not space efficient, because a shared vertex, will be stored many times. In a Cube for instance, each vertex is shared by 4 faces and 4 edges. Also it is unclear from this representation, which faces are connected to which, this make manipulation difficult. Face Vertex representation: In the representation we have a vertex list, which contains the (x,y,z) coordinates of all the vertices in the mesh. Each vertex is only stored once. There is a also vertex index which lists the vertices for each face(each group of three represents on triangle). The vertex index does not contain the coordinates of each vertex, instead, it contains indices or pointers into the vertex list. This representation is much more space efficient because, even though the vertex indices are repeated, they take up much less storage space than the 3 coordinates of a vertex. This representation is the most common representation used for rendering in computer games and graphics. However, it is still difficult to answer question like which vertices are on an edge or which faces are touching. Winged-Edge representation: Where dynamic changes to mesh topology are required for applications such as mesh editing, a more flexible representation is needed. The winged edge mesh explicitly represents vertices, faces and edges of a mesh. The core structure is the Edge List which lists the faces, vertices and the 4 closest neighboring edges for each edge. There is also a vertex list which stores the vertex coordinates and a list of edges for each vertex. Finally there is a Face list which stores the edges belonging to each face This representation is widely used in modeling programs to provide the greatest flexibility in dynamically changing the mesh geometry, because split and merge operations can be done quickly. Their primary drawback is large storage requirements and increased complexity due to maintaining many indices. The following are the advantages of Polygon Mesh: Polygon mesh has several advantages over other 3D modeling techniques. It is relatively easy to use and understand. It is also highly efficient, as it requires fewer polygons to create a 3D object than other techniques. Polygon mesh is also versatile. It can be used to create a wide range of shapes, from simple cubes to complex characters. It can also be used to create 3D printing models, as well as realistic animations and simulations. Polygon mesh is highly scalable. It can be used to create 3D models of any size, from tiny objects to large structures.

  • Rotate a triangle with coordinates A(0,0), B(1,1), C(5,2) by 45° about coordinate C in clockwise direction.

    We can do this easily using rotation transformation matrix. However, it is applicable only on origin. However, the question does not want us to rotate about C. It wants us to rotate about origin. A simple trick to solve this problem is to translate the triangle so that C becomes origin, rotate it and then translate it back to its position. So now, we know that we have to translate x coordinate of C by -5 and Y coordinate by -2 to make it 0,0. So, we do the same with coordinates of the other vertices of the triangle. The new triangle becomes: Now, we can apply the transformation matrix on the coordinates. You must be wondering why am I not calculating C coordinate values. This is because the rotation is happening about C. So there will be no change in C's coordinates. Even if we calculate them, they will remain unchanged. Hence it is a waste of time to calculate values for C's coordinates. Now the last step would be to translate the coordinates back to their original position. So, we add (5,2) to each coordinate. Coordinate A becomes ((-3/√2 + 5) , (-7/√2 + 2)) Coordinate B becomes ((-3/√2 + 5) , (-5/√2 + 2)) Coordinate C remains 5,2

  • Prove that parallel lines remain parallel under 2-D Transformations.

    Let us consider two parallel lines A and B with the slope m. Both of them have the same slope because parallel lines have the same slope. Now, let the coordinates of A be from (x1,y1) to (x2,y2) and let the coordinates of B be from (x3,y3) to (x4,y4). Now we know that We will use the above two equations later. Now we just have to prove that the difference is slope remains zero after transformation. Let us assume we have a transformation matrix as shown below: And now, let us apply this transformation matrix to our points (x1,y1), (x2,y2), (x3,y3), (x4,y4). Now, let us calculate the slopes of the transformed line. Slope of the first line, p, is given as: And now we can calculate the slope of the second line, q, as: Now, we can substitute the values of y4-y3 and y2-y1 we derived earlier in these equations. Since the slopes of the lines are same after transformation, we can say that they are parallel. Such type of transformations are also called affine transformations.

  • Find whether the following sets are unifiable or not? If they are unifiable, find most general unifier (m.g.u.) otherwise give justification why they are not unifiable.

    The given sets are as follows: {S(x,Ram),S(y,Sita)} {P(x,y),P(f(x),z),P(z,x)} There are three conditions for unification of two sets: Predicate symbol must be the same. Number of arguments in both statements must be identical. If two similar variables are present in the SAME expression, then unification fails. The first set is non-unifiable because constants can never be unified. In the second sentence, if we try to go for unification, we will end up with unifying x/f(x) which goes against the third rule. Hence, unification fails.

  • Write the joint distribution of x1, x2, x3, x4, x5 and x6 as a product of chain conditional probabilities for the following network.

    This question is based on Baye's Theorem. The joint distribution of x1, x2, x3, x4, x5 and x6 is represented by P(x1, x2, x3, x4, x5, x6). P(x1, x2, x3, x4, x5, x6) = P(x1) × P(x2 | x1) × P (x3 | x1) × P(x4 | x3 | x2 | x1) × P(x5 | x3 | x2) × P(x6 | x5) As we can see in join distribution, along with the element we must write its immediate parent as well.

  • Artificial Intelligence - B.Sc. (Hons.) Computer Science - Delhi University 2023 Question Paper

    This is the official question paper of Artificial Intelligence Paper of B.Sc. (Hons.) Computer Science Course at the University of Delhi. Question 1 is compulsory. Attempt any four questions from question 2 to question 8. Part of a question must be answered together. Some symbols may not be visible on mobile devices. Hence we recommend that you use a desktop to view the solutions to the questions. Download the Question Paper as PDF Question 1 (a): What do you understand by the term "Rational Agent"? View Solution Question 1 (b): What would be the output of the following statement in Prolog, and why? ? - A is 6 + 3, B = 5+4, A = B. View Solution Question 1 (c): Construct the truth table for the expression (A&(A∨B)). What single term is this expression equal to? View Solution Question 1 (d): Write the joint distribution of x1, x2, x3, x4, x5 and x6 as a product of chain conditional probabilities for the following network. View Solution Question 1 (e): Develop a parse tree for the sentence "Raja slept on the sofa". View Solution Question 1 (f): Compare and contrast Depth-first search and Breadth-first search. View Solution Question 1 (g): Transform the following into Conjunctive Normal Form (CNF): P ∨ (~P & Q & R) (~P & Q) ∨ (P & ~Q) & S View Solution Question 1 (h): Express the sentences given below into Conceptual Dependency Structures: Ram drove the car fast. Rita gave Sita a bunch of flowers. View Solution Question 1 (i): Give the properties of Type 1 and Type 2 grammars from the Chomsky Hierarchy of grammars. View Solution Question 1 (j): In the following two-ply game tree, the terminal nodes show the utility values computed by the utility function. Use the Minimax algorithm to compute the utility values for other nodes in the given game tree. View Solution Question 1 (k): Write about the limitations of Hill Climbing Search. View Solution Question 2 (a): Describe the water-jug problem. Also, give a suitable state space representation for this problem. View Solution Question 2 (b): Transform the following into clausal form. ∃x ∀y (∀z P(f(x),y,z)→(∃u Q(x,u) & ∃v R(y,v))) View Solution Question 3 (a): Write a Prolog program maxlist (L, Max) to find the greatest number Max in the list L. View Solution Question 3 (b): Find the probability of event A when it is known that some event B occurred. From experiments, it has been determined that P(B|A) = 0.84, P(A) = 0.2, and P(B) = 0.34. View Solution Question 4 (a): Determine whether the following sentence is satisfiable, contradictory or valid. S: (P ∨ Q) ⇒ (P & Q) View Solution Question 4 (b): Find whether the following sets are unifiable or not? If they are unifiable, find most general unifier (m.g.u.) otherwise give justification why they are not unifiable. View Solution Question 4 (c): Give PEAS Description for a Taxi Driver Agent. View Solution Question 5 (a): When do we say that the search is admissible? You can take the example of A*. View Solution Question 5 (b): What is a horn clause? Give an example. View Solution Question 5 (c): Solve the following crypt arithmetic problem using constraint satisfaction. View Solution Question 6 (a): What is a Truth Maintenance System (TMS)? Give the architecture of a problem solver with a TMS in the form of a diagram. View Solution Question 6 (b): Express the following concepts as an associative network structure with interconnected nodes and labelled arcs. Company ABC is a software development company. Three departments within the company are Sales, Administration and Programming. Joe is the manager of programming. Bill and Sue are the programmers. Sue is married to Sam. Sam is an editor for the Prentice Hall. They have three children and they live on Elm Street. Sue wears glasses and is five feet four inches tall. View Solution Question 7 (a): What is default reasoning? View Solution Question 7 (b): Translate the statements A1 through A4 into clausal form. Show that the predicate supports(book,cup) is true using resolution. A1. If x is on top of y, y supports x. A2. If x is above y and they are touching each other, x is on top of y. A3. A cup is above a book. A4. A cup is touching a book. (i) Translate the statements A1 through A4 into clausal form. (ii) Show that the predicate supports(book, cup) is true using resolution. View Solution Question 8 (a): Based on the context-free grammar represented by the following parse tree, draw the corresponding Recursive Transition Network (RTN). View Solution Question 8 (b): Draw the block diagram of the learning agent and explain its working. View Solution END OF PAPER

  • Artificial Intelligence - B.Sc. (Hons.) Computer Science - Delhi University 2022 Question Paper

    This is the official question paper of Artificial Intelligence Paper of B.Sc. (Hons.) Computer Science Course at the University of Delhi. Question 1 is compulsory. Attempt any four questions from question 2 to question 8. Part of a question must be answered together. Some symbols may not be visible on mobile devices. Hence we recommend that you use a desktop to view the solutions to the questions. Download the Question Paper as PDF Question 1 (a): Describe the following terms: (a) Heuristic Function (b) Software Agent View Solution Question 1 (b): Write a context-free grammar that can accept the sentence: "Ram hit the ball". View Solution Question 1 (c): In the following two-ply game tree, the terminal nodes show the utility values computed by the utility function. Use the Minimax algorithm to compute the utility values for other nodes in the given game tree. View Solution Question 1 (d): Find whether the following set is unifiable or not. If unifiable, find the most general unifier(m.g.u.). w = {PARENTS(x, FATHER(x), MOTHER(bill)), PARENTS(bill, FATHER(bill), y)} View Solution Question 1 (e): Express the following sentence as conceptual dependency structure: "Sohan gave Tina a box of chocolate" View Solution Question 1 (f): Write the conceptual graph and FOPL representation for the following sentence: "Every motorbike has a handle" View Solution Question 1 (g): Consider that append(L1, L2, L3) is a function in Prolog, in which list L1 is contacted with L2 and the result is stored in L3. What would be the output of the following statement in Prolog? ? - append([2,3,4],L,[2,3,4,a,b]) View Solution Question 1 (h): Find the meaning of the statement: (~P ∨ Q) & R → S ∨ (~R & Q) for the interpretation: P is true, Q is false, R is true, S is true. View Solution Question 1 (i): Determine whether the following sentence is satisfiable, contradictory or valid: P → Q → ~P View Solution Question 1 (j): Why should the heuristic function of A* algorithm always underestimate? Give reason, example. View Solution Question 1 (k): What is non-monotonic reasoning? Give an example. View Solution Question 1 (l): Prove that if A and B are independent events, P(A|B) = P(A). (Note that A and B are independent if and only if P(A&B) = P(A)P(B)) View Solution Question 2 (a): Differentiate between partially observable and fully observable task environment of an agent. Give an example of each. View Solution Question 2 (b): Create a frame network for terrestrial motor vehicles (cars, trucks, motorcycles) and give one complete frame in detail for cars which includes the slots for the main component parts, their attributes, and relations between parts. View Solution Question 3 (a): What is closed world assumption? Give an example. View Solution Question 3 (b): Define Modus Popens Rule. Elaborate using an example. View Solution Question 3 (c): Given formula S1 and S2 below, show Q(a) is a logical consequence of the two. S1: ∀x(P(x)→Q(x)) and S2: P(a) View Solution Question 4 (a): Create a script for shopping in a supermarket. View Solution Question 4 (b): Joint Probability P(x1,x2,x3,...,x7) by inspection as a product of chain conditional probabilities is: P(x1,x2,x3,...,x7) = P(x7 | x3) P(x6 | x5) P(x5 | x2 | x3) P(x4 | x1 x2) P(x4 | x1 x2) P(x3) P(x2 | x1) P(x1) Draw a Bayesian belief network for the same. View Solution Question 5 (a): Write a program in Prolog to compute the sum of elements of a list. View Solution Question 5 (b): What are alpha and beta cutoffs? How alpha-beta pruning is used to improve the efficiency of minimax procedure? View Solution Question 5 (b): What is a horn clause? Give an example. View Solution Question 6 (a): Compare and contrast Best-first search and Hill Climbing search. You can use example. View Solution Question 6 (b): What is a recursive transition network (RTN)? Give an example. View Solution Question 6 (c): Give two limitations of propositional logic. View Solution Question 7 (a): Consider the following axioms: January Clouds Cold & Precipitation → Snow January → Cold Clouds → Precipitation Convert them into clausal form and prove the truth of "Snow" using resolution. View Solution Question 7 (b): Translate the statements A1 through A4 into clausal form. Show that the predicate supports(book,cup) is true using resolution. S → NP VP NP → N NP → DET N VP → V NP VP → V PP VP → V NP PP PP → PREP NP DET → ART ADJ DET → ART N → man | dog | house V → locked ART → the | a ADJ → cruel PREP → in View Solution Question 8 (a): Solve the following crypt arithmetic problem using constraint satisfaction. View Solution Question 8 (b): Describe the limitations of hill climbing. View Solution Question 8 (c): Define PEAS for a vacuum cleaner agent. View Solution END OF PAPER

  • Create a script for shopping in a supermarket.

    There are six components of a script: Entry condition Result Prop Roles Track Scenes Similar to a frame, a script is composed of a frame and slots. We will use some terms that we learnt in contextual dependecy structures here. If you want the list of words we shall be using, refer to this question. The script for a supermarket is given below:

  • Create a frame network for terrestrial motor vehicles (cars, trucks, motorcycles) and give one complete frame in detail for cars which includes the slots for the main component parts, their attributes

    In artificial intelligence (AI), a frame network is a type of knowledge representation used to structure and organize information about objects, concepts, and their relationships. The concept of frames was introduced by Marvin Minsky in the 1970s as a way to represent stereotyped situations, and a frame network is an extension of this idea. A frame is a data structure that represents a concept or an entity. It contains various attributes (also called slots) and their associated values. These attributes values are represented in slots. Each slot can hold information or point to other frames. The frame network for the given question will be:

  • Prove that if A and B are independent events, P(A|B) = P(A). (Note that A and B are independent if and only if P(A & B) = P(A)P(B))

    We know that the probability of occurrence of A given that B has already occurred is given by, P(A|B) = P(A&B) / P(B) We know that A and B are independent events if P(A & B) = P(A) P(B) Substituting this in the equation we get, P(A|B) = P(A) P(B) / P(B) P(A|B) = P(A)

logo

Crookshanks Academy provides free educational resources to students.

Crookshanks Academy 2023 ©️ All Rights Reserved.
All logos used belong to the respective universities and have been used with appropriate permissions via e-mails.

This content is protected from right clicks.
bottom of page