Razor Code
Rambling about code since quite recently

Topics

User Functions





    Don't have an account yet? Sign up as a New User
    Lost your password?

Events

There are no upcoming events

Older Stories

Sunday 14-Sep

  • ACM ICPC 2008 (0)

  • Monday 11-Aug

  • NZ Programming Comp (0)

  • Sunday 27-Jul

  • Blast from the past (0)

  • Monday 21-Jul

  • Timetable generator again (0)

  • Tuesday 08-Jul

  • Hosting (2)

  • Saturday 05-Apr

  • Sparse Volume (0)

  • Friday 28-Mar

  • Carmack (0)

  • Tuesday 04-Mar

  • Back to Uni (0)
  • Dell Kill Switch Direct (0)

  • Monday 18-Feb

  • Lappy (0)

  •  Straints    
     Author: 
     Dated:  Thursday, April 09 2009 @ 11:04 PM NZST
     Viewed:  177 times  
    Programming

    Greetings. Much time has passed but I'm back. Today's item is a mini physics engine with point masses, constraints and damage. It uses verlet integration, basically as described in this article: Advanced Character Physics by Thomas Jakobsen but gradually deviating from it. Main difference so far is that I don't just resolve each constraint in turn, I get the amount each constraint wants the point to move first and then sort of mix them. I basically just wrote this thing to avoid going insane, but I am going somewhere with it. Whether I get there is another matter entirely. Currently the issues I have are that friction depends on how many iterations I run through the solver (since it's not represented as a force) and my constraint breaking feature is, er, broken (deformation is fine).

    I was going to put up a video but line graphics really don't compress well, so here are a few screenshots instead.




    Trackback

    Trackback URL for this entry: http://razorcode.net/trackback.php/Straints

    No trackback comments for this entry.
    Straints | 2 comments | Create New Account
    The following comments are owned by whomever posted them. This site is not responsible for what they say.
    Straints
    Authored by: Andrew on Tuesday, April 14 2009 @ 02:45 AM NZST
    Oooh new stuff.
    What's it for?
    Straints
    Authored by: Razor on Tuesday, April 14 2009 @ 10:47 PM NZST
    I fantasize about a build your vehicle then race it type of game, with damage and stuff. I won't get made, but physics engines are cool too. I've been implementing rigid bodies, and I actually managed to get them to work! Still pretty rough, but I've got a sphere attached to my cube by a rod now. Quaternions are hard. But not as hard as everyone makes them out to be. People are all "they're 4d imaginary numbers, impossible to visualise, don't even try". Not true. Well, the 4d imaginary number bit is, but you know what I mean. Best explanation is on wikipedia: http://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation