Got a bit frustrated because I couldn't get anything except a flat surface above the water, then read the tweets below and realised that's the entire point:
My mental model is of each side (think left/right in 2-D) of the iceberg competing with the other side to float to the surface by rotating the iceberg around it's center of gravity. The only stable positions are where these left/right rotational forces are balanced.
If an iceberg is currently floating in a vertical orientation where more of it's mass to one side of it's center of gravity (bottom half) is underwater compared to the mass on the other side (top half), then it's going to tend to rotate until both sides are equally above water, so (depending on mass distribution) horizontal orientations are likely to win over vertical ones.
Of course an iceberg could balance vertically, but that's like balancing a pencil on your finger - not the most stable, and any disturbance (such as the initial calving event) is likely to rotate it into a more stable horizontal orientation.
I found shapes that do not work well with the simulation: a very wide and narrow shape (like a needle) oscillates wildly and does not seem to stop or to even slow down.
The HTML source code is a well-commented, fun read.
- There's a fair bit of math to model drag, mass, and density using the specific gravity of ice and seawater (with tweaks to make it more realistic for 2d).
- Try adding a polygon that overlaps itself (self-intersects).
- You can paste images! The code traces the image and picks the most complex polygon.
No idea if others at Twitter suggested this as I can't read the thread (and have no intention to subscribe) but a nice add on would be a score inversely proportional to the travel an iceberg would need to obtain a stable floating position, with ideally the very hard goal to draw it already in a perfect stable way, waterline height included.
It isn’t too hard to get fairly close to that by drawing something that’s extremely stable, for example something very wide but not tall or an equilateral triangle, with one corner facing down.
Then, use your first attempt to correct for the correct height.
⇒ I think a good game would need some other constraint, maybe score more for max height above the surface, or for how long a polar bear can keep their feet dry while it melts (a very wide but not tall stripe will melt faster than something resembling a ball)
The center of displacement is always below the center of mass, so the iceberg never gets the stability of a rock hanging on a thread (ships can do that with ballast).
The only way for an iceberg to achieve stability is "differential" - every infinitesimal movement needs to move the center of displacement in a way which counters the movement. This basically means flat bottom.
Try drawing a "^" shape. The fundamental constraint is that the iceberg hates going too deep; with the two legs, any rotation would force that and is thus forbidden.
A flat bottom can almost work but is highly prone to accidental asymmetry.
xg15|1 year ago
https://threadreaderapp.com/thread/1362557149147058178.html
(Many thanks to Elon for making it impossible to read more than the first tweet on x.com without an account...)
ajb|1 year ago
https://imgur.com/a/7KANxOn
Very unlikely to occur in nature I guess :-)
HarHarVeryFunny|1 year ago
If an iceberg is currently floating in a vertical orientation where more of it's mass to one side of it's center of gravity (bottom half) is underwater compared to the mass on the other side (top half), then it's going to tend to rotate until both sides are equally above water, so (depending on mass distribution) horizontal orientations are likely to win over vertical ones.
Of course an iceberg could balance vertically, but that's like balancing a pencil on your finger - not the most stable, and any disturbance (such as the initial calving event) is likely to rotate it into a more stable horizontal orientation.
kazinator|1 year ago
JadeNB|1 year ago
https://threadreaderapp.com/thread/1362557149147058178.html
WhitneyLand|1 year ago
RobertRoberts|1 year ago
furyofantares|1 year ago
joshdata|1 year ago
Go science! Support your local climate scientist!
cscurmudgeon|1 year ago
Curious about this: I am hitting a boundary-condition like behavior drawing a straight line at a 45 degree angle similar to the sibling comment.
Curious if it is due to physics or due to the simulation.
_Microft|1 year ago
I found shapes that do not work well with the simulation: a very wide and narrow shape (like a needle) oscillates wildly and does not seem to stop or to even slow down.
jackspratts|1 year ago
- js.
sinuhe69|1 year ago
https://streamable.com/0a9zmb
sinuhe69|1 year ago
https://jmp.sh/s/ARfqurF7BYQExwIQmWXZ
Dunati|1 year ago
madcaptenor|1 year ago
This is all from 2021 and I feel like I’d seen this prior to that but I can’t find it.
sa46|1 year ago
- There's a fair bit of math to model drag, mass, and density using the specific gravity of ice and seawater (with tweaks to make it more realistic for 2d).
- Try adding a polygon that overlaps itself (self-intersects).
- You can paste images! The code traces the image and picks the most complex polygon.
GeorgeRichard|1 year ago
xg15|1 year ago
(jk)
jsnell|1 year ago
https://news.ycombinator.com/item?id=26201160
squarefoot|1 year ago
Someone|1 year ago
Then, use your first attempt to correct for the correct height.
⇒ I think a good game would need some other constraint, maybe score more for max height above the surface, or for how long a polar bear can keep their feet dry while it melts (a very wide but not tall stripe will melt faster than something resembling a ball)
arun-mani-j|1 year ago
miduil|1 year ago
praptak|1 year ago
The only way for an iceberg to achieve stability is "differential" - every infinitesimal movement needs to move the center of displacement in a way which counters the movement. This basically means flat bottom.
kazinator|1 year ago
https://i.imgur.com/YLPYITL.png
https://i.imgur.com/Q7T0zns.png
tedunangst|1 year ago
o11c|1 year ago
A flat bottom can almost work but is highly prone to accidental asymmetry.
navane|1 year ago
ant6n|1 year ago
tolerance|1 year ago
[deleted]
mrcwinn|1 year ago
kromokromo|1 year ago
Mostly penises most likely (like any "draw something online" service).
(I am also guilty)
joshdata|1 year ago
mhatma|1 year ago
taneq|1 year ago
amelius|1 year ago
(A perfect circle would have many, but you could consider that a degenerate configuration.)
eternauta3k|1 year ago
ljsocal|1 year ago
blackoil|1 year ago
nick7376182|1 year ago
talkingtab|1 year ago
alphanumeric0|1 year ago
Gunax|1 year ago
Obscurity4340|1 year ago
personalityson|1 year ago
amelius|1 year ago
barfbagginus|1 year ago
For example this iceberg towers above the water in one equilibrium, but barely rises above the water in its other equilibrium.
https://ibb.co/SdcKMBV