Thread: volumes and areas

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    2

    volumes and areas

    If i needed to integrate to find a volume or area of a 3d shape how could I do it in the program as fast as possible?

  2. #2
    geek SilentStrike's Avatar
    Join Date
    Aug 2001
    Location
    NJ
    Posts
    1,141
    The code I posted here won't do it as fast as possible.. but it will do it in the blink of an eye for <10^5 iterations.

    http://www.cprogramming.com/cboard/s...threadid=13293

    You can optimize that simpson's integral to use half as many calls to evaluate (and thus pretty much twice as fast), but the code will be a little longer.
    Prove you can code in C++ or C# at TopCoder, referrer rrenaud
    Read my livejournal

Popular pages Recent additions subscribe to a feed