Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Physics question(Newton)

Author
Message
James H
10
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 8th Feb 2018 02:11
Can anybody tell me how the calculation of the visual objects inertia was calculated in the rigid body designer tool(RBD.exe) that comes with Newton wrapper 1.53?

I can confirm the tool is using the box calculation method for the visual object of the fiero.bod, yet the results I get from using the command to calculate box inertia(NDB_CalculateMIBoxSolid), do not match the results produced by the tool.

I have even checked a cube of size 1.0 in the tool against the results of the same command, the command produces uniform values for inertia on a cube but the rigid body designer tools x and y values are different, the z value DOES match the z result of the command, just the x and y values are different, they are slightly less, although they are both the same value as each other:

*I used a mass value of 200
tools box calculation results of 1.0 cube:
Ix=29.17, Iy=29.17, Iz=33.33

newton box calculation command results of 1.0 cube:
Ix=33.33, Iy=33.33, Iz=33.33

If a visual object for the body is present the tool appears to use this to get its sizes from for the inertia calculation, if not it will use first primitive created - it basically seems to use the first object loaded/created. That is how I was able to test the cube's results. I also checked the contents of the fiero.bod file against the tools results of the same visual object when loaded into a fresh project, this is how I can confirm the tools own box method was used as the results are the same.

So should I be doing something other than use the command on it's own?
Win 7 Pro 64 bit SP1, AMD A4-5300 APU 3.4GHz, 8GB DDR3, NVidia GeForce GTX 750 1GB GDDR5, ASUS A55BM-E
James H
10
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 12th Feb 2018 17:30
Bump, anyone? Getting desperate now lol!

To clarify, i=(m(a^2+a^2))/12 is the same as the command NDB_CalculateMIBoxSolid.

The results of a uniform cube using the NDB tool show that the x and y results as less than the command's results. However using the fiero.x object with the tool, the x and y results are considerably greater than the command results.
I also checked a uniform cube of a size larger than the fiero.x models longest side, the cubes results show same pattern - the x and y results are also less than the command/manual calculation.

Fiero.x results(Mass 200, Size x 7.97, Size y 1.96, Size z 3.34):
NDB tool - Ix=429.25, Iy=1424.76, Iz=1124.23

i=(m(a^2+a^2))/12 OR NDB_CalculateMIBoxSolid - Ix=250.96, Iy=1246.47, Iz=1124.23

There must be some physics wizards around surely who can at least suggest what might be going on? I really need/want this calculation as well as understand it. In fact this bothers me so much I wonder if my need to understand is greater than my wanting the use of the calculation lol!

Regards
Win 7 Pro 64 bit SP1, AMD A4-5300 APU 3.4GHz, 8GB DDR3, NVidia GeForce GTX 750 1GB GDDR5, ASUS A55BM-E
Chris Tate
DBPro Master
9
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 14th Feb 2018 07:43
This is not my area of understanding.

If you have not already received a reliable answer from within Newton Physics plugin community, or the plugin developer, I wish you the best of luck finding it.

James H
10
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 14th Feb 2018 22:15
Thanks Chris, I did get a response from Kjelle69 who updated the wrapper around v1.32. User tiresius did latest version and I think it was walaber who started and updated it up to v1.32. Kjelle69 said
Quote: "All the commands are basically passed to rhe underlaying function in newton game Dynamics. (Not all if them, but as far as I remember the inertia calculation) I think it centers around the cg point of the object."

walaber has not responded. I have only just sent tiresius an email. I couldn't find anything on any of the forums, have even gotten to reading stuff there not related in the hopes something might twig. No luck so far though.
I replied to Kjelle but heard nothing back, I am guessing that is all that he/she has to say about it. Am currently trying to track down who created the tool, because I believe some other calculation was made to mimic centre of gravity, as the cg(centre of gravity) cannot be gained from the models data - a cube is uniform with a centroid dead centre. The tools mass inertia calculation results should show uniform results which suggests a new centre of gravity is imposed, so the mass inertia commands cannot have been used alone. The Newton.dll required in the executable's folder for the tool is also older than the latest wrapper version, I swapped it out, it ran with one error but continued anyway and the mass inertia commands gave the same results a the latest updated 1.53 version, so it is something definitely written in the tool and not the wrapper. So really I need to find out who wrote it, ask them, hope its not an old contact address should I even find one and then hope that they respond...favourably! So odds aren't looking so good so far, the further back in time I go in searches the more dead links I come across, I have so far read one post by walaber asking if anyone would care to make the RBD.exe tool, but saw no responses.
Win 7 Pro 64 bit SP1, AMD A4-5300 APU 3.4GHz, 8GB DDR3, NVidia GeForce GTX 750 1GB GDDR5, ASUS A55BM-E
tiresius
15
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 15th Feb 2018 02:57 Edited at: 15th Feb 2018 02:58
Hello sorry I have not played with Newton physics for a long time and actually never used the RBD tool. I always manually made rigid body shapes. Sorry can't be of more help.

You could always make your own RBD tool, might be fun ?
James H
10
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 15th Feb 2018 03:55 Edited at: 15th Feb 2018 04:00
Hi tiresius thanks for the response, that is what I am doing, I used to use the tool years ago while just playing around really, but then had issues running it on win10 some time back. I am back on win7 now so thought I would do my own version as I recalled that even with RBD tool it was a pain in the neck to make and tweak vehicles. What I have so far allows me to manually recreate the fiero example 6 vehicle or any vehicle and works just fine, I can have extra wheels, manually align them and rotate the actual wheel all using the gizmo plugin...but there are some things yet to be done and having the center of gravity option where I could just manually place it then click on a button to do a fresh inertia calculation to account for the new centre, correctly, would be nice. So far I am stuck with having to load a mesh into RBD tool if I want to use this weird offset that appears to exist. I am just trying to stick close to the example. It looks like walaber wrote this tool in DBP but didn't want to progress it himself. I do seem to recall a conversation in these forums about the existence of the imposed offset and the reasons behind it, but I cannot find it and I don't even recall if the values and calculation where mentioned. I want to be able to add a new centre of gravity which there is a command for, but it does need a new inertia calculation to account for it. The code for solid box inertia was easy to work out for centroid from google searches and was able to confirm results using the newton command results for comparison...but I only have guesses as to what I do exactly with the new centre of gravity. I then have no way of confirming guesswork results as correct which is why I really wanted to know about RBD tool.

Edit:
I thought I read you was considering updating to 2.0 years ago, is that right/how far did you get?
Win 7 Pro 64 bit SP1, AMD A4-5300 APU 3.4GHz, 8GB DDR3, NVidia GeForce GTX 750 1GB GDDR5, ASUS A55BM-E
tiresius
15
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 15th Feb 2018 16:29
I did not get to update to Newton 2.0 there was someone who had gotten bare-bones dll started but the project never went anywhere.
I'm (still) not a real C++ programmer so even finishing the minor update to 1.53 took a lot of work for me to get it going.
Newton 2.0 / 3.0 / latest is a lot different from Newton 1.x so it would probably need a complete rewrite.
James H
10
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 15th Feb 2018 19:36
Well thanks for what you have done already
Win 7 Pro 64 bit SP1, AMD A4-5300 APU 3.4GHz, 8GB DDR3, NVidia GeForce GTX 750 1GB GDDR5, ASUS A55BM-E
Derek Darkly
6
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 16th Feb 2018 00:08
Ah! I'm of no use, but this reminds me I used to have a great Newton physics demo downloaded from somewhere in the forums here but I lost it. Would like to recover it if possible... does anyone by chance recall such a demo? It had some stairs and some bullet textures, etc. It was a simple, yet flawless demo.
Send your parents to noisy sprite demo hell... enter the D-Zone
James H
10
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 16th Feb 2018 01:49
There is a demo matching that description that comes with the wrapper - demo 5 fps example
Win 7 Pro 64 bit SP1, AMD A4-5300 APU 3.4GHz, 8GB DDR3, NVidia GeForce GTX 750 1GB GDDR5, ASUS A55BM-E

Login to post a reply

Server time is: 2018-02-18 05:18:47
Your offset time is: 2018-02-18 05:18:47