Chronic Logic

Pontifex => Problems => Topic started by: mendel on October 23, 2001, 09:11:30 PM

Title: Short-Link physics bugs
Post by: mendel on October 23, 2001, 09:11:30 PM
A cable over 90 HD units in length will still not break.
This is almost as high as the construction grid (with land lowered!).
It carries 4 heavy sticks (as any long cable) before ripping the linkbox.
If using 2 more cables to attach weight, I can put about 8 heavy sticks on.
Even a 2 HD unit cable (this is as short as it gets) supports the 90 HD unit monster. However, a 2 HD light steel box bursts; gotta have a 3HD box to hang that cable from. This means it weighs less than a light stick. Believe me, these cables are not heavy :-)

Btw, using two cables in a V shape (instead of 1 vertical one of same length) to hold a linkbox increases its strength by more than 50%.

(Edited by mendel at 2:46 pm on Oct. 23, 2001)

Title: Short-Link physics bugs
Post by: Calastigro on October 23, 2001, 10:09:22 PM
My point being that cable should be heavy, but isn't.
Title: Short-Link physics bugs
Post by: VRBones on October 25, 2001, 11:33:12 PM
Thanks for the explanation CL. Looks like it killed the discussion and people's wild hypotheses ;).  To try to add something constructive to the thread, why not just add a constant value (different for each span type) to the strength after the ratio? This would then represent (Veeery roughly) the density and cross-sectional strength of the span type; properties of the material that wouldn't change anyway. This would then mimic a constant maximum shear potential as well as leaving alone the angular momentum that already looks like it's working realistically. Since it is only one addition function, it would also be a negligable impact to the overall speed.  Although it should give more natural feeling lengths, it would also dramatically change the gameplay. Dunno whether it's worth fiddling with it until version 2?
Title: Short-Link physics bugs
Post by: JohnK on October 23, 2001, 11:03:01 PM
If the cables were any heavier, a system to pre-stress (I loked it up, i was calling it pre-tension, but microsoft world english dictionary says pre-stress is the right word) the cables would be necessary. The cables sag enough as it is with their light weight, but if you were to make them realistic! They would rip everything apart rather than hold it up!. Perhaps the reduced weight was meant to balance out the lack of a system to pre-stress them.
Title: Short-Link physics bugs
Post by: mendel on October 26, 2001, 07:36:56 PM
What I would like to see - explanation or not - is a thorough documentation of the Pontifex physics as implemented - what is how strong and why. It means that novices can get up to speed better, and pros can reason about their bridges instead of trial & error to see what works. (Important for me as I have a slow PC).

The spirit of measuring these things by conducting experiments that started this thread would lead us there eventually - although Alex could probably help a lot along the way if he could find the time to write it all up :-)

Title: Short-Link physics bugs
Post by: OverClok on October 23, 2001, 11:04:09 PM
Quote: from Calastigro on 1:55 pm on Oct. 23, 2001
One thing i dont think you're factoring in... Cable is heavy!  we're talking huge steel cable here!  after a certain point, cable should snap under its own weight.Exactly! But the longer cables (which should be weaker because they're supporting more of their own weight) are stronger than shorter ones!
Title: Short-Link physics bugs
Post by: Argonut on October 27, 2001, 11:57:44 PM
Now I don't know exactly how the physics is implemented so I might be a bit off on my theorising, but I was wondering if when a shorter link has it's stress levels increased by a ratio of length/optimal length, does it also have it's spring strength increased by the same ratio? When a spring is cut in half, it's spring constant is now twice was the original spring's was, and it only compresses half the distance when the same force is applied. Are the spring constants of the links in Pontifex constant, or do they vary like a cut spring? Perhaps this would help the shorter links hold equivalent weights before breaking?
Title: Short-Link physics bugs
Post by: Calastigro on October 24, 2001, 01:24:20 AM
Its as if the code was just scaling up the members in all directions to make them longer, instead of just making them longer.... weird.

A thought popped into my head... Maybe short steel members are weaker because they have less 'give'?  A little bit of flexion makes an object a lot harder to break, and flexion is increased by length....  but that still doesn't account for cable... FEH!

Title: Short-Link physics bugs
Post by: mendel on October 28, 2001, 08:08:57 PM
Argo (I can't bring myself to write "nut" when I know it should be "naut" and you're no nut, at that), that was quite an inspired guess! I think you may be right!

I made up another experiment to check. It compares loading both a 20m and a 40m bar equally, and if you look closely, you see the top of the  20m bar is actually lower than that of the other! It seems it compresses even more. Stress seems to be 40% vs. 10%.
My current guess is: spring constant is unchanged for all lengths, so the short bar strains as much as the long bar (absolute length change); actually, a bit more, since the diagonals are at more of an angle. Then, stress is calculated by strain, not by strain/rest length. This would result in stress being inversely proportional to the square of the bar length (applied force being constant), which is in line with the somewhat inaccurate stress measurement.

All this is just so much guesswork; can anybody come up with better experiments to confirm this?

Notes on measuring with tspring.pxb: I used 1024x768; "Low Detail" to make the bars show up as pixel-wide lines; much "R" in edit mode so I can really zoom up close in Test mode; make a screenshot with the heights I want to compare in the same picture, preferably near the horizon; then measure pixel displacement using a gfx program; that also measures RGB values of the stress color to get the percentages.

Title: Short-Link physics bugs
Post by: VRBones on October 24, 2001, 01:21:49 PM
I did some research on this last night as I had also pondered about the issue of length. I'd also written out an article to post here, but my modem had timed out or something, so I posted it to my crappy site.

In essence I'd started out thinking along  the lines of calastigro, while trying to disprove mendel, and ended up coming to a conclusion like Falkon2's ! So I could have waited a day and had it solved for me ;)

Title: Short-Link physics bugs
Post by: beaujob on October 29, 2001, 04:27:41 AM
Well, here's what I've come up with to confuse the issue...  If you add beams to a joint, it does in fact cause the area around that joint to break quicker.  I made a quick little map which adds more and more beams at each joint as you go from left to right.  The rightmost tower has the most beams that I could figure out how to attach to the tower in some meaningful structural fashion.

(http://www.tjhsst.edu/~jbowman/collapse1.gif)
(http://www.tjhsst.edu/~jbowman/collapse2.gif)
(http://www.tjhsst.edu/~jbowman/collapse3.gif)
(http://www.tjhsst.edu/~jbowman/collapse4.gif)

If you look closely, you'll see that the tower with more cross-bracing will collapse sooner.  If you wish, you can toy around with my bridge (http://www.tjhsst.edu/~jbowman/Three01.pxb)

Title: Short-Link physics bugs
Post by: mendel on October 24, 2001, 10:24:41 PM
Trying to disprove me - what were you thinking? :-)

Actually, congratulations on your well-reasoned article, much more exact than my off-the-cuff estimates of the percentages involved.
I don't have time right now to go into this more, so here are some suggestions:

1) Breaking strengths of 3HD and 6HD box can be narrowed down further by shortening the stick below the 2-bar at the top of the breaking column.

2) Relating cable weight to light steel weight and using short cable sections to refine things would be a bad idea because changing the connections on a structure has strange side effects. (witness replacing the 2 heavy steel sticks with light sticks and a heavy crossbeam, and both HD8 towers pop boxes)

3) Calculating Y for HD8 is erroneous because it's not the bar that breaks on this tower, it's the link box that pops. (Link boxes are still an open research question at this time.) Same goes for HD7.

I think pontifex would be more accessible (if not more fun) if  the physics was more intuitive. A beginner will optimize his bridge by shortening bars to save weight (worked well in BB); pros will replace two long bars with one long bar and be more effective, but it's not easy to find that out.

If you think you'd get link boxes for free, that's not true because small bars are heavier per unit length - this is because of the proportionally longer diagonals and the absolute weight of the link boxes. Weight per unit 2HD=41, 4HD=26, 8HD=19 using VRBones's figures. Since a link box is stronger than a 2 HD bar, they're probably even heavier in proportion, making the penalty worse.  And then there's the strength loss because of the diagonals' angle...

Title: Short-Link physics bugs
Post by: mendel on October 29, 2001, 08:36:51 AM
Nice job, beaujob! For those who haven't noticed, the effect is similar to that in the My tower rips itself to pieces? thread.

All this points to a common physics engine problem: as the construction gets stiffer, it is more likely to explode due to numerical instability of the engine.

During simulation, it may happen that beam ends move away from the joints; the engine then applies force to the beam to close that gap again, and that force can rip the beam apart if you're unlucky (and it is particularly stiff).
This problem may get worse by the non-real strain of the members as it may be prone to produce bigger gaps, especially with the diagonal cross-bracing.

Moral: don't construct stiff structures, make them loose! :-)

(I wonder if these guesses will turn out to be true... ;-)

Title: Short-Link physics bugs
Post by: on October 24, 2001, 11:20:56 PM
The reason shorter links are weaker than stronger ones is because of the way the physics are modelled, the stress of a link is calculated based on the ratio of the original length to its current length.  Part of the reason I used this method is because each link takes the same amount of cpu time, so bridges built with fewer and longer links will run faster than a bridge built with many short ones.  Short cables are especially weak because all cable segments are made of at least 2 links, so a 20 m cable segment will be made into 2 10 m cable segments.  Obviously this isn't realistic but theres a lot of balancing required to keep it easy to edit and still be able to run on the average pc.
Title: Short-Link physics bugs
Post by: mendel on November 09, 2001, 11:54:59 AM
I have posted a short comparison of the 4 different materials here.
Title: Short-Link physics bugs
Post by: Calastigro on October 23, 2001, 08:55:20 PM
One thing i dont think you're factoring in... Cable is heavy!  we're talking huge steel cable here!  after a certain point, cable should snap under its own weight.  i'm gonna go find that point out now....

[edit]  AHA!  that point doesn't exist in Pontifex!  (either that or the maps simply aren't big enough...)

I've been trying to weigh the difference between a 4-length of heavy steel and 4 1-lengths, but my studies are hindered by the brittleness of 1-lengths.  go figure.

[/edit]

(Edited by Calastigro at 2:11 pm on Oct. 23, 2001)

Title: Short-Link physics bugs
Post by: baggio on October 24, 2001, 11:35:21 PM

See http://pontifex.mendelsohn.de/forum/sthang1.pxb and sthang2.pxb.
Interesting.  In Sthang2.pxb, I've been trying to figure out how deleting the segment with the delete arrow, prevents the entire structure from collapsing.

I think it is in part due to the elasticity of the cable and the moment of the supported beams.  If you slow down the break, the center beam is the first joint to break.  (Incidently on the joint, and not on the cable as has been mentioned)  The reduced tension on the center, causes an elastic snapback that is felt on the common cable segment.

This translates down the other two cables and gives them an ever so slight tug.  This additional force is enough to break their joints and send the entire structure crashing.  

I find odd that once all this weight is releaved though, the cables do not recoil consistant with the tension that they had been placed under.  

Ask anyone in the Navy, line snapback is a very really, and potentially deadly event.  Those cables should be going every which way.

Title: Short-Link physics bugs
Post by: Calastigro on October 25, 2001, 02:44:44 AM
AHA!  I was right!  they scale up (or down) the model members in all directions!  hahaha!  
Title: Short-Link physics bugs
Post by: OverClok on October 23, 2001, 01:34:38 AM
This has been mentioned before, but not resolved (to my knowledge) - why is it that the strength of a beam/cable is proportional to its length? Such that a 1-unit beam/cable will support virtually no additional stress, but longer structural elements will be much much stronger...

For example, here are three Heavy Steel pillars (just to give a common footing) supporting the highest tower that won't collapse with 1-unit, 2-unit and 4-unit light steel beams:

As you can see, the 4-unit beams can have 9 beams without collapse (10 collapses after several seconds), 2-unit beams can only go up 5 beams, and 1-unit beams, wow... it can't even support anything beyond the weight of itself! This has got to be a physics bug of some sort (mat-c may have mentioned the problem here?) The same issue is apparent with cables - short ones can't support much at all

This is high on my priority list of things that should be fixed, I think...

Title: Short-Link physics bugs
Post by: JohnK on October 23, 2001, 03:15:35 AM
Maybe the rigidity (is that a word?) of the joints has something to do with it? The boxes are very strong & heavy.
Title: Short-Link physics bugs
Post by: mendel on October 23, 2001, 08:12:35 AM
Kudos to OverClok for actually measuring this effect! Great idea!

I used to think this was physically ok, because the short box diagonals are at more of an angle (45° for 1x1 as opposed to 14° for a 4x1 box). However, setting 100% as the bar breaking load, a 4-box can take 1176% against 1-box 965%, and even with the added relative weight of short boxes (15.3 vs. 12.2 per unit length), this does not account for the strength loss you've observed.

In real life, the longer a (solid) bar gets, the more likely it is to fail by buckling outward, so the compresive strength actually decreases with length. (If you pull, you have no buckling, so strength against tension remains constant).

Title: Short-Link physics bugs
Post by: mendel on October 23, 2001, 11:23:15 AM

I did more precise testing, using only one "short" box and stacking big boxes on top for height, adjusting the top box to the limit. http://pontifex.mendelsohn.de/forum/stest4.pxb / http://pontifex.mendelsohn.de/forum/stest4.gif (90kB) full size shot of the image at the top.
The two large sizes (7/8 HD units) crack because the link cube breaks, the boxes stay intact. The small (2 HD) box at the top of the 6 unit tower breaks, too - this is the opposite of a small object breaking at the bottom of a cable...
Looking at the heights of the towers for box sizes 2-6, the effect seems non-linear, possibly quadratic.

To remove this "feature" from Pontifex would probably mean breaking a lot of working bridge designs.
Title: Short-Link physics bugs
Post by: falkon2 on October 23, 2001, 12:36:49 PM
This might be the result of some formula manipulation to make the game more balanced and/or more fun to play..

I like it the way it is, though. As it is now, you have to strike a balance between strength and budget for lateral supports. If the members for the short bars were as strong as the long ones, you can make lateral supports all 2 units and this would make it really easy to arrive at the cheapest possible solution (as opposed to constant tweaking currently needed to get the right balance)

edit: By lateral supports, I mean bars that connect two arches or pillars together so that their tension/compression is distributed. I.e. cables between a heavy steel arch and the deck

If the short pieces could withstand the same load as the long pieces, 4 2-unit long members instead of a 8-unit member would give you free joints (because the joints cost nothing). Thus, there wouldn't be any reason to build your members longer than 2 or 3 units.

(Edited by falkon2 at 5:44 am on Oct. 23, 2001)

Title: Short-Link physics bugs
Post by: OverClok on October 23, 2001, 01:05:59 PM
Switching over to cables:

I just put a bunch of cable lengths and as many heavy steel beams as it could support. Any cable 6-units or longer could support 6 beams (the longer cables were stretchier, but supported the load no better and no worse). But once you get below 6 units, things get much worse:
6-units = 6 Heavy Steel beams
5-units = 5 Heavy Steel beams
4-units = 4 Heavy Steel beams
3-units = 2 Heavy Steel beams
2-units = 1 Heavy Steel beam

The discussion of internal structural-elment angles and such shouldn't apply here, should it? A cable is, well, just that, there's no joints, angles, etc (or at least there shouldn't be). So what's the deal here?

In the case of cables, they don't snap in half, they break at the joint with the steel - the steel isn't any different no matter how long the cable, so it can't be the steel breaking, but why should the strength of the cable be dependent on its length?

Title: Short-Link physics bugs
Post by: OverClok on October 23, 2001, 01:28:22 PM
I just tried Light Steel tension ability - similar story:

There's no problems with the 4-unit beams, the 3-unit beams do a bit worse, 2-units a lot worse, and once again the 1-unit beam can only just about support its own weight! No news here, just showing it's the same for tension & compression.

Something unusual I did stumble across. Remember that objects-fall-at-equal-rates theory? Well, doesn't seem to work in Pontifex:

You can see in the first shot that the longer beams broke first and yet just before they hit the ground, you can see that the 1-unit beams are falling much faster than the 2-unit ones... (ignore the 3-unit beams, they've already partially crashed into the ground in the 2nd shot). Why is this? Shouldn't be air resistance (if that's even factored into the engine) since they all have the same horizontal surface area, and other than air resistance, all objects should fall at the same rate, right?

Title: Short-Link physics bugs
Post by: mendel on October 23, 2001, 06:52:43 PM
My tower level (see above) provides anchors at the top for cable experiments... :-)
Hanging light steel (tension) has the same strength as making towers (compression), I could hang as much weight from it as I could stack with the tower config.

The length of cable seems to affect the strength of the link box it attaches to.
If you're using a cable which has two joint = 3 section, and only the middle section is short, it will hold much more weight than it would if you attached a box to the short piece (or switched the short section down).
Of course, with an anchor at top, you don't need a top section really.
You can also use a cable joint to attach more cables, like an inverted Y. Even if they're the same length, the lower cables will tear first (from the box).

See http://pontifex.mendelsohn.de/forum/sthang1.pxb and sthang2.pxb.


[corrected URL]

(Edited by mendel at 9:08 pm on Oct. 23, 2001)