Raycasting is a technique used in the creation of computer games. The basic idea of raycasting is as follows: the map is a 2D square grid. Using rays generated from an object, this 2D map can be transformed into a 3D perspective. One of the methods involves sending out a ray from the player's location. To determine how far he/she is from a wall or an obstacle, the distance between the player's coordinates and the coordinate of the wall is calculated. If the player is near the obstacle, it looks larger and vice-versa.

Shown below is a game, Wolf 3D, which was created using raycasting.

 

Riju wants to create an online snooker game using raycasting. The game in the creation stage on a coordinate map is shown below.

The snooker table has six pockets (P1, P2, P3, P4, P5 and P6) and he has shown three balls - white (W), red (R) and green (G) on the table. The objective of the game is to use the white ball to hit the coloured balls into the pockets using a cue stick.

 

Question 37 ( i )

How much distance will a ray travel if sent from the green ball to the nearest pocket? Show your work.

 

[Case Based] Raycasting is a technique used in creation of computer - Practice Questions CBSE - Maths Class 10 (2023 Boards)

part 2 - Question 37 (i) - Practice Questions CBSE - Maths Class 10 (2023 Boards) - Solutions of Sample Papers for Class 10 Boards - Class 10
part 3 - Question 37 (i) - Practice Questions CBSE - Maths Class 10 (2023 Boards) - Solutions of Sample Papers for Class 10 Boards - Class 10

Remove Ads

Transcript

Raycasting is a technique used in the creation of computer games. The basic idea of raycasting is as follows: the map is a 2D square grid. Using rays generated from an object, this 2D map can be transformed into a 3D perspective. One of the methods involves sending out a ray from the player's location. To determine how far he/she is from a wall or an obstacle, the distance between the player's coordinates and the coordinate of the wall is calculated. If the player is near the obstacle, it looks larger and vice-versa. Shown below is a game, Wolf 3D, which was created using raycasting. Riju wants to create an online snooker game using raycasting. The game in the creation stage on a coordinate map is shown below. The snooker table has six pockets (P1, P2, P3, P4, P5 and P6) and he has shown three balls - white (W), red (R) and green (G) on the table. The objective of the game is to use the white ball to hit the coloured balls into the pockets using a cue stick. Question 37 (i) How much distance will a ray travel if sent from the green ball to the nearest pocket? Show your work.

Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh is an IIT Kanpur graduate and has been teaching for 16+ years. At Teachoo, he breaks down Maths, Science and Computer Science into simple steps so students understand concepts deeply and score with confidence.

Many students prefer Teachoo Black for a smooth, ad-free learning experience.