AC3D Forums Calculate the Volume of an Object
 Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 28th June 2007, 05:06 AM #1 davew_nz Junior Member Junior member   Join Date: Jun 2007 Posts: 3 Calculate the Volume of an Object Hi all, I have searched the forums but can't see the answer. You can calulate the area of a surface in AC3D but how do you calulate the volume of an object? For example if you were drawing an Airship (that was not just a sphere but a more complex shape) where can I select the Object and get the volume? Thanks, Dave
 28th June 2007, 04:01 PM #2 Dennis Senior Member Professional user     Join Date: Jul 2003 Posts: 899 Re: Calculate the Volume of an Object There's no built-in function of which I'm aware for calculating volumes in AC3D. However, I had some code lying around for calculating 3d volumes, so put it together for AC3D. Unfortunately, it only works for the Windows version, but the source code is available. http://supercoldmilk.com/ac3dplug/calcvol.html Be sure to check out the Exceptions section, as your geometry must follow certain guidelines to get an accurate volume reading. Let me know if it works for you and I'll post it to the plugins area. Dennis
 28th June 2007, 07:13 PM #3 davew_nz Junior Member Junior member   Join Date: Jun 2007 Posts: 3 Re: Calculate the Volume of an Object Dennis, Thanks for the plug in, very quick work. I have just run a few tests on some core shapes and answers are below. all based on 1x1x1 sized objects. I found that the default 12 pointed circle in AC3D when you create a round object caused a discrepancy in the result but as I subdivided the object the result moved closer and closer to the expected value (as you would expect but interesting to see) __________Math_______Plug-in (default Circle)__Plug-in (after subdivide x3) Cube______1.0________1.0 Pyramid____0.3333_____0.3333 Cylinder____0.7857_____0.75 Cone______0.2619_____0.25 Sphere_____0.5236_____0.48447_____________0.52137 Once again thanks for the plug-in excellent work. Regards Dave Last edited by davew_nz; 28th June 2007 at 07:18 PM.
28th June 2007, 08:08 PM   #4
Dennis
Senior Member
Professional user

Join Date: Jul 2003
Posts: 899
Re: Calculate the Volume of an Object

Quote:
 Originally Posted by davew_nz I have just run a few tests on some core shapes and answers are below.
I initially thought the discrepancies here are largely due to the lack of smoothness of polygonal objects versus "real world" smooth objects.

But I did a couple of tests, and I find that the number changes depending on where in 3D space the object is placed.

I'll take another look at this and get back with my findings.

Thanks,
Dennis

 29th June 2007, 06:57 PM #5 Dennis Senior Member Professional user     Join Date: Jul 2003 Posts: 899 Re: Calculate the Volume of an Object I performed a couple of fixes to correct a couple of calculations, but have overall bad news on the volume calculator. I did some research and found a couple more articles that use the divergence theorem to calculate 3D volumes. I created an implementation that takes a different approach (using the same theorem) from the one I use, and it consistently comes up with the same result as my existing algorithm, inaccuracies and all. Both implementations also have the unfortunate effect of changing the results with a simple Divide on the object, which, one would think, should have no impact on the volume. Further investigation yielded that this is a known issue with many volume calculation implementations based on this theorem. There are supposedly solutions that address this, but it's not something I would have the time to research/implement. Meanwhile, I've left the page up with the volume calculator, and have added a disclaimer at the top: "The resulting calculated volume using this algorithm known to be inaccurate, and any results from this plugin should be taken as an estimated volume at best. For some geometry, testing has shown a +/-25% discrepancy in calculated volumes from actual volumes." I'll leave it out there for now, but this is still, unfortunately, not a working solution...
 30th June 2007, 10:48 PM #6 davew_nz Junior Member Junior member   Join Date: Jun 2007 Posts: 3 Re: Calculate the Volume of an Object Dennis, Thanks for all of your work on this. Dave
 17th August 2017, 10:41 AM #7 Krahazik Junior Member Member     Join Date: Jan 2016 Location: Washington State, USA Posts: 10 Re: Calculate the Volume of an Object It would appear the host website for this plugin notlonger exists.
21st August 2017, 10:40 AM   #8
captainpeter
Senior Member
Professional user

Join Date: May 2004
Location: Vienna / Austria
Posts: 207
Re: Calculate the Volume of an Object

Quote:
 Originally Posted by Krahazik It would appear the host website for this plugin notlonger exists.
The plugins are now hosted here.

cheers
peter
__________________
--
P e t e r M e i n i n g e r
------------------------------------

The X-Plane Freeware Project

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules

All times are GMT -4. The time now is 02:21 PM.

 Archive - Top

AC3D Forum
(C) Inivis Limited 2020