volumes and areas

This is a discussion on volumes and areas within the C++ Programming forums, part of the General Programming Boards category; If i needed to integrate to find a volume or area of a 3d shape how could I do it ...

  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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21