Jump to content


geometric problem


6 replies to this topic

#1 anubis

    Senior Member

  • Members
  • PipPipPipPip
  • 2225 posts

Posted 05 May 2003 - 11:42 AM

hm, i can't get my head around this.
i have cube sitting at the origin of the world. i want the cube to emitt particles on it's edge points against it's rotation and movement. my idea was to safe the modelview matrix of the object compute the new one and use them both to get the old and new position of any given vertex emitting a particle. the direction in which particles get emitted would be the vector from the new pos to the old one. somehow this doesn't work though. is there something fundamentaly wrong with my assumptions ??? does anybody have a better idea ???
If Prolog is the answer, what is the question ?

#2 Dia

    DevMaster Staff

  • Administrators
  • 1089 posts

Posted 05 May 2003 - 12:27 PM

if you are dealing with only position, why would you need a matrix? Why not have variables that store the old position and new one?

#3 anubis

    Senior Member

  • Members
  • PipPipPipPip
  • 2225 posts

Posted 05 May 2003 - 12:38 PM

well for more complex objects than a cube it would be waste of memory to store that object twice
If Prolog is the answer, what is the question ?

#4 baldurk

    Senior Member

  • Members
  • PipPipPipPip
  • 1057 posts

Posted 05 May 2003 - 06:15 PM

btw (OT) apex: you should put your avatar on devmaster.net
baldurk
He who knows not and knows that he knows not is ignorant. Teach him.
He who knows not and knows not that he knows not is a fool. Shun him.

#5 fringe

    Member

  • Members
  • PipPip
  • 44 posts

Posted 05 May 2003 - 09:57 PM

hmmm, makes sence to me you basically do this right?

Normalise(matrixBefore*corner - MatrixAfter*corner) is the direction of the new particle


fringe

#6 anubis

    Senior Member

  • Members
  • PipPipPipPip
  • 2225 posts

Posted 06 May 2003 - 08:57 AM

and that's exactly my code... something is wrong... i'll check the math code. maybe the bug is there
If Prolog is the answer, what is the question ?

#7 fringe

    Member

  • Members
  • PipPip
  • 44 posts

Posted 06 May 2003 - 09:25 AM

I can have a look at the code if you liek but definitely no promises. Send it to,

holtjr *at* th.ph.bham.ac.uk (<----trying not to get emailed by bots)

fringe





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users