• Advertisement

h4tt3n

Member
  • Content count

    418
  • Joined

  • Last visited

Community Reputation

1974 Excellent

About h4tt3n

  • Rank
    Member

Personal Information

  • Interests
    Art
    Business
    Design
    DevOps
    Education
    Programming
  1.   I am using this method to analyze and control deformable soft bodies in a physics engine. When creating an object of a particular, well defined shape, like for instance a truss or girder with the orientation vector pointing along the length of the body, I can see on screen how the orientation (visualized by a point and a line) drifts away from the physical shape. This happens slowly by simply adding angular velocity and letting it rotate unconstrained by external forces. When influencing it through collision or by constraining it to other bodies, the orientation quickly drifts away from the correct value.   This seems like the exact use-case for shape matching -- i.e you start with a particular arrangement of particles. Why exactly do you want to avoid having to define a "rest pose"?     I am among other things using it for shape matching. I don't necessarily want to avoid a method based on a rest pose, I have already implemented this. It's just that I am almost completely sure it can be done without it. If a particle cloud's linear state, moment of inertia, angular momentum, velocity, and energy can be computed accurately from particle state, then so can the angle. I just haven't figured out how yet...     I store all particles in a global std::vector like array. All objects store a similar array of member particle ptr's. This way, particles can be added and removed from objects at run-time without too much trouble, and a particle can be a member of more than one body at a time. The hack orientation vector you suggest will only have an apparent, superficial connection with the body's actual angular state. I am looking for an unambiguous, exact method that conserves energy and momentum like the method of keeping track of linear state mentioned in the OP. If I use your suggestion, I will either add or remove energy from the system when the bodies interact in a way that depends on angular state.
  2.   I am using this method to analyze and control deformable soft bodies in a physics engine. When creating an object of a particular, well defined shape, like for instance a truss or girder with the orientation vector pointing along the length of the body, I can see on screen how the orientation (visualized by a point and a line) drifts away from the physical shape. This happens slowly by simply adding angular velocity and letting it rotate unconstrained by external forces. When influencing it through collision or by constraining it to other bodies, the orientation quickly drifts away from the correct value.
  3.   This is exactly what I have been doing so far, getting usable but not quite accurate enough results. The clouds linear position and velocity, moment of inertia, and angular velocity can be determined accurately. Angle is then determined by integrating with time, and this tends to drift, especially when the cloud experiences sudden changes in shape and orientation. 
  4. Thanks for the feedback, you have given me two good clues to follow. 
  5.   In the linear motion case, any particle can move freely relative to the rest of the particles, including "yo-yoing". Still, the global position and velocity are incredibly useful for analyzing the behavior and properties of the cloud as a whole. For instance, this is used in orbital mechanics to analyze anything from asteroid belts over gas clouds to entire clusters of galaxies. The same goes for the rotational properties of a body of particles. The linguistic terms of "forward" and "up" have no meaning here, it's an entirely abstract mathematical description.    I am trying to keep track of angular orientation and velocity. Yes, the individual particles can in principle move freely relative to the body of particles as a whole. Haven't heard of principal component analysis, will take a look at it.
  6. Thanks, I'll take a look at it. Like you suggest, I have implemented a method, where each particle has a "rest position" which is translated and rotated like a regular rigid body with explicit angular properties. What I'm looking for is a method that works without the hidden points.   Cheers, Mike
  7. Hello folks,   For a cloud or group of particles it is possible to find the global linear state (average position and velocity "as if" the particles were one body) by summing up particle position and velocity multiplied by particle mass and then dividing the sums with global mass. Something like this: for each particle p     global_position += p->position * p->mass     global_Velocity += p->velocity * p->mass next p global_position *= global_inverse_mass global_velocity *= global_inverse_mass Is there a similar unambiguous way to determine rotational or angular state for a group of particles? I have managed to determine angular velocity by summing up angular momentum and dividing by global moment of inertia, but I still miss a good way to determine orientation. Simply computing angle as  angle += angular_velocity * time_step  will quickly drift away from the correct value. Thanks in advance!   Cheers, Mike
  8. How To Publish on GameDev.net

  9. How To Publish on GameDev.net

    Hello admins,   About two years ago I posted this article about springs in the math & physics section. I am currently rewriting and expanding the article, which is now more focused, has code samples, and includes some clarifications based on reader feedback. Would you recommend that I simply replace the old article with the new one (which has a different title), or that I post it like a new article, for peer review?   Cheers, Mike
  • Advertisement