3D Pong
Concepts of computer graphics used to simulate the 3D version of ping-pong
- Matrix transformations are used to model the 3D room by transforming cubicle walls.
- Phong shading is employed to provide a smooth shading to the objects.
- Matrix transformations are also used to control the direction in which the ball heads after hitting the paddle or the table.
- Plane equations to detect collision of the ball with the paddle and with the table are used.
- Interpolations are used to provide a smooth motion of the user controlled paddle(user interaction).
![image](https://private-user-images.githubusercontent.com/77756530/311595720-16716ed8-93d8-407c-aa7d-fed9871c8bb3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI1NTQ5NzQsIm5iZiI6MTcyMjU1NDY3NCwicGF0aCI6Ii83Nzc1NjUzMC8zMTE1OTU3MjAtMTY3MTZlZDgtOTNkOC00MDdjLWFhN2QtZmVkOTg3MWM4YmIzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODAxVDIzMjQzNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI5OGY0ODNkNzU1YTMwY2MwN2M5OTJiMjUwZjRjNGQwZjZiNzg3NGRkOWQ0MDhlYjg2YjIzY2I3YzBiZWMxZjYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ZEq6TkKDvMi1ToklcjWm_2EnlQJ7ofT75SEek6bEx_U)