How can you determine if a ray intersects a sphere? The more efficient your solution, the better.
Answer / Virendra Kumar Sharma
There are several methods to check if a ray intersects a sphere. One of the most efficient methods is using the Intersection of a Ray with a Sphere equation: t = (B - A) * (C - A) / 2D + sqrt((A - C)^2 - r^2), where A, B, and C are three consecutive points on the ray, D is their distance, and r is the radius of the sphere. This method can be further optimized by computing squares instead of using square roots or by early termination when the distance between the ray and the sphere exceeds the diameter.
| Is This Answer Correct ? | 0 Yes | 0 No |
How does a flocking-based steering system work? What are the components of a flocking-based steering system, and how are they combined? When does flocking-based steering break down or produce undesirable results? Are there any performance implications of the standard flocking model as described by Craig Reynolds, and if so, what are some ways to address them?
Using the example of the Thief-like AI system in the previous section, how do you implement the 'search for player' behavior for the guards, and get them to search an area in a believable fashion? How do you make sure this searching behavior isn't too challenging for players, and ensure that it's usually possible for the player to escape the search if he plays the game well?
Two trains running in opposite directions cross a man standing on the platform in 27 seconds and 17 seconds respectively and they cross each other in 23 seconds. The ratio of their speeds is:
How to manage Payment terms in Credit Management?
Where we can activate Rebates?
How to Populate a Table With Rows?
You're developing a boss encounter in a 3D platformer game, and the boss has 15 different attacks. The game designers have asked you to make sure that the player sees as many of those 15 attacks as possible during the encounter, and that he seldom or never sees the same attack twice in a row. What are some ways you can do this? What does the attack selection algorithm look like in this case? Keep in mind that not all attacks are possible all the time -- for example, the boss has a melee attack that he can only do when the player is very close, and a bombardment attack he can only do when the player is far away.
Do you know the S/4 HANA?
In one room in your game, there's an elevator that AIs will need to use to escape from the player. In order to use the elevator, they have to walk over to a special button on the wall, press it to summon the elevator, then walk into the elevator and press another button to tell it to ascend. How would you design a system to make sure AIs can do all of these things in the proper order? If you have 3 AIs in the room, how would you design the system to make sure they can all escape in the elevator at the same time? What happens if one of them dies while they're trying to do this, and how do you make sure the other AIs don't get stuck waiting for that dead AI?
You have an AI player in an RTS game that occasionally needs to send scouts out onto the map to perform reconaissance. Designers want each scout to move around semi-randomly, exploring various parts of the map, particularly those that have been seen the least recently. Assume that the game is grid-based and has a fog-of-war feature. Also assume that the scouts are very cheap and dispensable, and it's OK for them to walk into the enemy base or other dangerous areas. How would you implement the system to decide where the scouts should go? What sort of data structure do you need to support this? How can you ensure that the scouts do a good job of exploring the map thoroughly? What are the performance characteristics of your approach? Is there any risk of scouts getting stuck trying to go somewhere that isn't even accessible?
How to Create a Database?
There were 100members who are standing in circle form with numbered on them like 1, 2,3 upto 100. If number 1 has a knife and killed the next one right behind him and give it number 3 likewise it contines upto 100.Then who will be left if this process repeated?
Software (196885)
Sciences (12521)
Engineering (38019)
Business Management (7371)
Accounting (11552)
Advertising Media (662)
Architecture Design (207)
Call Centre (2483)
Fashion Modelling (332)
Government (17384)
Law (806)
Tourism Hotel (377)
Everything Else (2323)
Military Police (160)
Skills Abilities (0)
Aptitude Questions (4307)
Placement Papers (705)
Certifications (3752)
Visa Interview Questions (2230)
Code Snippets (1098)
Entrance Exams (862)
ERRORS (16636)