Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Java3D 1 3D-Pool Game Simulator CS491B Aslan Neishaboori.

Similar presentations


Presentation on theme: "Introduction to Java3D 1 3D-Pool Game Simulator CS491B Aslan Neishaboori."— Presentation transcript:

1 Introduction to Java3D 1 3D-Pool Game Simulator CS491B Aslan Neishaboori

2 Introduction to Java3D 2 Background Simulation: CS area of study CS and other fields hand-in-hand Needs data Provides simulators

3 Introduction to Java3D 3 Background Benefits: Prediction Unknown aspects of the study matter Cost effective

4 Introduction to Java3D 4 Background 3D Graphics One of important branches of CS Java 3D Involves advance OO programming

5 Introduction to Java3D 5 3D pool Simulator The data is provided The physics of the game is known 3D Graphics Somewhere to start! Pool has a simple Geometry

6 Introduction to Java3D 6 Objective: Simple presentation Accurate physics

7 Introduction to Java3D 7 Objectives Add involving physical factors one by one Start with main factors Abstract less important factors

8 Introduction to Java3D 8 What are the factors? Gravity Cue Friction Velocity Rotation, Spin Elasticity of collisions ….

9 Introduction to Java3D 9 Spin and Translation!

10 Introduction to Java3D 10 Linear and angular velocity + Friction!

11 Introduction to Java3D 11 Simplify: Create a simple working model first Add more functionality to that model

12 Introduction to Java3D 12 Code! Geometry classes Initialization classes Auxiliary classes Behavior classes Collision detection classes

13 Introduction to Java3D 13 Scene Graph? A scene graph is a tree-like data structure that stores, organizes, and renders 3D scene information (3D objects, materials, lights, behaviours...). It is not a tree It has nodes and arcs (connects the nodes) Nodes are java classes

14 Introduction to Java3D 14 Content BranchView Branch

15 Introduction to Java3D 15 BG TG Content Branch

16 Introduction to Java3D 16 Actual code TransformGroup + shape3D’s BallTG() CueTG() tableGeometry() TableTop() Outlines()

17 Introduction to Java3D 17 Initializing other classes: Initz_balls() CompleteTable() Init_Cue()

18 Introduction to Java3D 18 Transformations: Translation Scaling Reflection Rotation

19 Introduction to Java3D 19 3D Rotation The 3D rotation matrices about each coordinate: About x-axis (x-roll) About y-axis (y-roll) About z-axis (z-roll)

20 Introduction to Java3D 20 Behavior Classes: StickMouseTranslate() StickMouseRotate() CueBallCollision() KeyNavigatorBehavior() in pool1() class

21 Introduction to Java3D 21 Problems JAVA 3D API is complex Collision detection Communication between live nodes

22 Introduction to Java3D 22 Final word 3D pool covers the whole Java 3D Good practice for OO programming Open source / Online project and….

23 Introduction to Java3D 23 Thank you,


Download ppt "Introduction to Java3D 1 3D-Pool Game Simulator CS491B Aslan Neishaboori."

Similar presentations


Ads by Google