Anim8or Community
May 24, 2013, 10:49:34 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: The v0.97d Preview is now available!  See the "Anim8or v0.97 Preview" Forum for details.
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: I'm haveing trouble with some geometry  (Read 2294 times)
Nate_Bro
Newbie
*
Posts: 31



View Profile WWW
« on: January 08, 2008, 02:47:55 pm »

I'm working on a particle system, but I'm haveing trouble with reflections. I have colision detection, but when the particles need to change direction, my formula is not very good.

all i'm doing now is fliping the axis...

like (4,5) == (-4,5)

Thanks for any help you can provide,
Logged

My computer specs for Anim8or and other graphics:
1.  3.2 GHz Pent 4 HT 1 MB L2, with ATI 128 MB Vid Card
2.  3.0 GHz Pent D 4 MB L2, with ATI 512 MB Vid Card
3.  1.7 GHz Pent Celeron M, with ATI 64 MB Vid Card
Steve
Administrator
Sr. Member
*****
Posts: 456



View Profile
« Reply #1 on: January 11, 2008, 12:20:33 pm »

You need to reflect the incomming vector off the plane of reflection.  Your computation assumes that the plane is x=0.  In general the direction of the outgoing vector is:

Vout = Vin + 2N*Dot(Vin, N)

where N is the plane normal, Vin is the normalized incomming direction and Vout is the outgoing direction,  (You need to normalize Vout after this computation.)

Here is a detailed description.  See equation (3) (but not that the normal is reversed from my formula so the subtract the terms instead of adding them).

http://mathworld.wolfram.com/Reflection.html
Logged
sciwizeh
Newbie
*
Posts: 22



View Profile
« Reply #2 on: January 11, 2008, 05:22:45 pm »

when i read the first post i wasn't sure what you were asking, but now i get it.

had i known i would have said: to make bouncing realistic would require a bit of vector math, i don't know the specifics.

i believe steve has put it in pretty good terms
Logged

<a href="http://www.freewebs.com/sciwizehgames">My site</a>
<a href="http://matrixpeckham.googlepages.com">My other site</a>
Nate_Bro
Newbie
*
Posts: 31



View Profile WWW
« Reply #3 on: January 11, 2008, 05:37:44 pm »

Thank you Steve, that helps a lot! I'm still new to vector math and normals, but I'm slowly learning Smiley
Logged

My computer specs for Anim8or and other graphics:
1.  3.2 GHz Pent 4 HT 1 MB L2, with ATI 128 MB Vid Card
2.  3.0 GHz Pent D 4 MB L2, with ATI 512 MB Vid Card
3.  1.7 GHz Pent Celeron M, with ATI 64 MB Vid Card
lppena
Full Member
***
Posts: 198


Anim8or, does a body good.


View Profile WWW
« Reply #4 on: February 07, 2013, 12:24:13 pm »

Thank you Steve, that helps a lot! I'm still new to vector math and normals, but I'm slowly learning Smiley

I hear what you're saying about vector math and it's role in 3D modeling software like Anim8or. I wish that someone would post some articles on how Anim8or uses this information to do stuff in Anim8or. Steve, you created a quite awesome product with some very advanced features. I use Anim8or all the time now and seem to grow more fond of it the more that I play with it. Leroy.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!