SlideShare a Scribd company logo
1 of 7
Simple Collision Detection CS3241 Lab 10
Objectives Implement Plane to Sphere collision detection Sphere to Sphere collision detection Collision Response
Sphere to Sphere Collision Detection If sphere1 & sphere2 collide n = c2 – c1 |n| <= r1 + r2 depth = |n| - (r1+r2) normal = n / |n| c2 r2 n r1 c1
Plane to Sphere Collision Detection Forming a plane Compute normal by 3 vertices, p1, p2, p3 normal = (p2-p1) x (p3-p1) If plane and sphere d = c1 * plane’s normal d <= p + r normal = plane’s normal depth = p + r - d c1 d p
Collision Response Simulate response From Physics, we know…. As original Velocity can be de-composited to two part  V1, V2 V2 will remain the same but V1 will flip Vnew = Vold – 2* (Vold * Normal)*Normal How about stickiness? normal Ori. velocity c1 V1 V2
Tasks Task 1 Plane to Sphere collision detection Fill in  boolcheckCollide(BoundSphere *n1, BoundPlane*n2, float dt, ContactInfo *ci) Some notes: BoundSphere & BoundPlane are just simple structure holding normal, radius… Please look into ContactInfo as returning these info will help you adding collision response Task 2 Collision Response Fill in  void checkCollision() Some notes: Work on sphere to plane collision response But other responses are similar
Thanks Hope you enjoy this laband find it useful for your assignment 4

More Related Content

What's hot

Pert management
Pert management Pert management
Pert management Ahmed Gamal
 
Pert2 management
Pert2 managementPert2 management
Pert2 managementAhmed Gamal
 
Lec 2 construction management
Lec 2 construction managementLec 2 construction management
Lec 2 construction managementAhmed Gamal
 
Dual slope for DVM PPT
Dual slope for DVM PPTDual slope for DVM PPT
Dual slope for DVM PPTruikarsachin
 
Carry save adder Type 2
Carry save adder Type 2Carry save adder Type 2
Carry save adder Type 2Atchyuth Sonti
 
H onors hw solutions on free fall
H onors hw solutions on free fallH onors hw solutions on free fall
H onors hw solutions on free fallstephm32
 
A* (aster) Search Algorithm
A* (aster) Search AlgorithmA* (aster) Search Algorithm
A* (aster) Search AlgorithmSanzid Kawsar
 
Integrator for multimeter
Integrator for multimeterIntegrator for multimeter
Integrator for multimeterruikarsachin
 
EM integrations
EM integrationsEM integrations
EM integrationsFFMdeMul
 
Growth and decay ...capacitor
Growth and decay ...capacitorGrowth and decay ...capacitor
Growth and decay ...capacitorShivanand Angadi
 
Synschronous counter
Synschronous counterSynschronous counter
Synschronous counterHassan Sardar
 
Wk 12 fr bode plot nyquist may 9 2016
Wk 12 fr bode plot nyquist   may 9 2016Wk 12 fr bode plot nyquist   may 9 2016
Wk 12 fr bode plot nyquist may 9 2016Charlton Inao
 

What's hot (20)

Pert management
Pert management Pert management
Pert management
 
Pert2 management
Pert2 managementPert2 management
Pert2 management
 
Lec 2 construction management
Lec 2 construction managementLec 2 construction management
Lec 2 construction management
 
Groth and decay.....
Groth and decay.....Groth and decay.....
Groth and decay.....
 
Dual slope for DVM PPT
Dual slope for DVM PPTDual slope for DVM PPT
Dual slope for DVM PPT
 
Carry save adder vhdl
Carry save adder vhdlCarry save adder vhdl
Carry save adder vhdl
 
Carry save adder Type 2
Carry save adder Type 2Carry save adder Type 2
Carry save adder Type 2
 
persamaan diferensial
persamaan diferensialpersamaan diferensial
persamaan diferensial
 
H onors hw solutions on free fall
H onors hw solutions on free fallH onors hw solutions on free fall
H onors hw solutions on free fall
 
A* (aster) Search Algorithm
A* (aster) Search AlgorithmA* (aster) Search Algorithm
A* (aster) Search Algorithm
 
Laplace
LaplaceLaplace
Laplace
 
Bode Plots
Bode Plots Bode Plots
Bode Plots
 
Solving heat conduction equation (parabolic pde)
Solving heat conduction equation (parabolic pde)Solving heat conduction equation (parabolic pde)
Solving heat conduction equation (parabolic pde)
 
Integrator for multimeter
Integrator for multimeterIntegrator for multimeter
Integrator for multimeter
 
EM integrations
EM integrationsEM integrations
EM integrations
 
Growth and decay ...capacitor
Growth and decay ...capacitorGrowth and decay ...capacitor
Growth and decay ...capacitor
 
On the Step Explosion Problem
On the Step Explosion ProblemOn the Step Explosion Problem
On the Step Explosion Problem
 
Bode lect
Bode lectBode lect
Bode lect
 
Synschronous counter
Synschronous counterSynschronous counter
Synschronous counter
 
Wk 12 fr bode plot nyquist may 9 2016
Wk 12 fr bode plot nyquist   may 9 2016Wk 12 fr bode plot nyquist   may 9 2016
Wk 12 fr bode plot nyquist may 9 2016
 

Similar to Cs3241 Lab 10

Unit-1 DAA_Notes.pdf
Unit-1 DAA_Notes.pdfUnit-1 DAA_Notes.pdf
Unit-1 DAA_Notes.pdfAmayJaiswal4
 
5.2 divide and conquer
5.2 divide and conquer5.2 divide and conquer
5.2 divide and conquerKrish_ver2
 
Gate ee 2012 with solutions
Gate ee 2012 with solutionsGate ee 2012 with solutions
Gate ee 2012 with solutionskhemraj298
 
Design and analysis of algorithm ppt ppt
Design and analysis of algorithm ppt pptDesign and analysis of algorithm ppt ppt
Design and analysis of algorithm ppt pptsrushtiivp
 
Equation plane
Equation planeEquation plane
Equation planecmnell
 
asymptotic notations i
asymptotic notations iasymptotic notations i
asymptotic notations iAli mahmood
 
02 asymptotic notations
02 asymptotic notations02 asymptotic notations
02 asymptotic notationsTarikuDabala1
 
6-Nfa & equivalence with RE.pdf
6-Nfa & equivalence with RE.pdf6-Nfa & equivalence with RE.pdf
6-Nfa & equivalence with RE.pdfshruti533256
 
4.2 collision detection
4.2 collision detection4.2 collision detection
4.2 collision detectionSayed Ahmed
 
Admission in india 2015
Admission in india 2015Admission in india 2015
Admission in india 2015Edhole.com
 
Introduction to probability solutions manual
Introduction to probability   solutions manualIntroduction to probability   solutions manual
Introduction to probability solutions manualKibria Prangon
 
How to design a linear control system
How to design a linear control systemHow to design a linear control system
How to design a linear control systemAlireza Mirzaei
 
Math House SW
Math House SWMath House SW
Math House SWjjlendaya
 

Similar to Cs3241 Lab 10 (20)

Unit-1 DAA_Notes.pdf
Unit-1 DAA_Notes.pdfUnit-1 DAA_Notes.pdf
Unit-1 DAA_Notes.pdf
 
5.2 divide and conquer
5.2 divide and conquer5.2 divide and conquer
5.2 divide and conquer
 
03 dc
03 dc03 dc
03 dc
 
clock_theorems
clock_theoremsclock_theorems
clock_theorems
 
Gate ee 2012 with solutions
Gate ee 2012 with solutionsGate ee 2012 with solutions
Gate ee 2012 with solutions
 
Design and analysis of algorithm ppt ppt
Design and analysis of algorithm ppt pptDesign and analysis of algorithm ppt ppt
Design and analysis of algorithm ppt ppt
 
Equation plane
Equation planeEquation plane
Equation plane
 
asymptotic notations i
asymptotic notations iasymptotic notations i
asymptotic notations i
 
02 asymptotic notations
02 asymptotic notations02 asymptotic notations
02 asymptotic notations
 
Contour
ContourContour
Contour
 
6-Nfa & equivalence with RE.pdf
6-Nfa & equivalence with RE.pdf6-Nfa & equivalence with RE.pdf
6-Nfa & equivalence with RE.pdf
 
4.2 collision detection
4.2 collision detection4.2 collision detection
4.2 collision detection
 
Lec10
Lec10Lec10
Lec10
 
Admission in india 2015
Admission in india 2015Admission in india 2015
Admission in india 2015
 
Escola naval 2015
Escola naval 2015Escola naval 2015
Escola naval 2015
 
Introduction to probability solutions manual
Introduction to probability   solutions manualIntroduction to probability   solutions manual
Introduction to probability solutions manual
 
How to design a linear control system
How to design a linear control systemHow to design a linear control system
How to design a linear control system
 
Math House SW
Math House SWMath House SW
Math House SW
 
Maths04
Maths04Maths04
Maths04
 
Vectors2
Vectors2Vectors2
Vectors2
 

Recently uploaded

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 

Recently uploaded (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Cs3241 Lab 10

  • 2. Objectives Implement Plane to Sphere collision detection Sphere to Sphere collision detection Collision Response
  • 3. Sphere to Sphere Collision Detection If sphere1 & sphere2 collide n = c2 – c1 |n| <= r1 + r2 depth = |n| - (r1+r2) normal = n / |n| c2 r2 n r1 c1
  • 4. Plane to Sphere Collision Detection Forming a plane Compute normal by 3 vertices, p1, p2, p3 normal = (p2-p1) x (p3-p1) If plane and sphere d = c1 * plane’s normal d <= p + r normal = plane’s normal depth = p + r - d c1 d p
  • 5. Collision Response Simulate response From Physics, we know…. As original Velocity can be de-composited to two part V1, V2 V2 will remain the same but V1 will flip Vnew = Vold – 2* (Vold * Normal)*Normal How about stickiness? normal Ori. velocity c1 V1 V2
  • 6. Tasks Task 1 Plane to Sphere collision detection Fill in boolcheckCollide(BoundSphere *n1, BoundPlane*n2, float dt, ContactInfo *ci) Some notes: BoundSphere & BoundPlane are just simple structure holding normal, radius… Please look into ContactInfo as returning these info will help you adding collision response Task 2 Collision Response Fill in void checkCollision() Some notes: Work on sphere to plane collision response But other responses are similar
  • 7. Thanks Hope you enjoy this laband find it useful for your assignment 4