WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #18  
Old 01-11-2005, 12:45 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

As you suggested, the problem is that there are too many balls. The number of collision tests performed increases exponentially with each ball that is added. This increases the amount of time between each iteration, which in turn allows the ball to poke through the walls.

The builtin timer function actually uses a very accurate time routine, however it is limited by the frame rate of the application.

Here is the equation used to calculate the reflection vector. There are various sources on the internet that go into detailed explanations on how this equation is derived.

R - Reflection vector
V - Incoming vector
N - Normal vector

R = V - (2 * V dot N) N
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:17 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC