[HN Gopher] Draw an iceberg and see how it will float
       ___________________________________________________________________
        
       Draw an iceberg and see how it will float
        
       Author : mabynogy
       Score  : 341 points
       Date   : 2024-06-08 22:04 UTC (1 days ago)
        
 (HTM) web link (joshdata.me)
 (TXT) w3m dump (joshdata.me)
        
       | Gunax wrote:
       | Very cool, simple, and easy. This is exactly what demos should
       | be.
        
       | tedunangst wrote:
       | Not so easy to get just the tip of the iceberg to stand out.
        
         | o11c wrote:
         | 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.
        
         | navane wrote:
         | A very flat triangle with convex flanks does the job
        
         | ant6n wrote:
         | Draw a fat boat with a very thin long mast.
        
       | nick7376182 wrote:
       | Would be cool if it melts preferentially, choosing either air or
       | water to be "warmer".
        
       | blackoil wrote:
       | For me multiple humps seems to be most stable
        
       | mrcwinn wrote:
       | I'm so over flappy birds now.
        
       | jsnell wrote:
       | (2021)
       | 
       | https://news.ycombinator.com/item?id=26201160
        
       | alphanumeric0 wrote:
       | This reminds me of gomboc
        
       | arun-mani-j wrote:
       | Very cool (literally) stuff. I drew a straight line and it keeps
       | spinning :D
        
       | mhatma wrote:
       | This is very entertaining.
        
       | GeorgeRichard wrote:
       | This is great fun--and accurate. My lettuce floated just like the
       | picture I drew when I tested it in the bath.
        
         | xg15 wrote:
         | I know you should wash lettuce before eating, but that seems
         | like overkill...
         | 
         | (jk)
        
       | xg15 wrote:
       | 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:
       | 
       | 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 wrote:
         | Here's a non-flat one:
         | 
         | https://imgur.com/a/7KANxOn
         | 
         | Very unlikely to occur in nature I guess :-)
        
           | xanderlewis wrote:
           | https://ibb.co/ZLYxr4x
           | 
           | Sometimes to innovate you have to think like a child -- or a
           | teenager.
        
             | rvnx wrote:
             | Make sure to patent it before they use this as base design
             | for the Cybertruck^2
        
             | isoprophlex wrote:
             | Nice tip on that iceberg
        
             | barfbagginus wrote:
             | I was about to post something similar. But you nailed it
             | before I could swing my own hammer, to use a figure of
             | speech.
        
             | barfbagginus wrote:
             | I was about to post something similar. But you nailed it
             | before I could swing my own hammer, to use a figure of
             | speech.
        
         | HarHarVeryFunny wrote:
         | 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.
        
           | Sharlin wrote:
           | That's exactly it. An iceberg can't stay "vertical" for the
           | exact same reason that a pencil can't stay vertical. Even if
           | perfectly balanced, the equilibrium is unstable.
        
         | WhitneyLand wrote:
         | Try something that has no flat surfaces. For example a five
         | pointed star.
        
         | furyofantares wrote:
         | Hexagons work
        
         | RobertRoberts wrote:
         | I drew an equilateral triangle and it floats flat on top.
        
       | praptak wrote:
       | 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.
        
       | Obscurity4340 wrote:
       | This would make a great "fidget" app
        
       | joshdata wrote:
       | Author here. Glad to see this making the rounds again after a few
       | years.
       | 
       | Go science! Support your local climate scientist!
        
         | _Microft wrote:
         | This is very cool.
         | 
         | 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.
        
         | cscurmudgeon wrote:
         | Great education simulation! Thanks for working on this.
         | 
         | 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.
        
           | joshdata wrote:
           | I am pretty sure it's the simulation.
        
         | jackspratts wrote:
         | nice job. these simulations are 2d. does 3d make a difference?
         | i'm almost about to start carving styrofoam to see.
         | 
         | - js.
        
       | miduil wrote:
       | Kinda funny to draw the classic examples of "tip of the iceberg"
       | to see them ending up flipping :D
        
       | ljsocal wrote:
       | It would be interesting to create a version of this that would
       | show how different displacement hull shapes would float.
        
       | barfbagginus wrote:
       | Note that many icebergs have more than one equilibrium, with
       | various final heights above the water.
       | 
       | 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
        
       | sinuhe69 wrote:
       | I got a design which wobbles infinitely! :D The clip was live
       | recorded, not looped.
       | 
       | https://streamable.com/0a9zmb
        
         | Dunati wrote:
         | It seems to have trouble with long skinny shapes, I had one
         | that would keep moving and occasionally flip over
        
       | madcaptenor wrote:
       | A version which has some preloaded shapes and shows the forces
       | explicitly, inspired by the same tweet: https://engaging-
       | data.com/iceberger-remixed/
       | 
       | This is all from 2021 and I feel like I'd seen this prior to that
       | but I can't find it.
        
       | personalityson wrote:
       | Bug? https://i.imgur.com/VraUTnq.png
        
       | taneq wrote:
       | From my brief experimentation I have determined that the precise
       | initial orientation of the dick^H^H^H^Hiceberg is critical to its
       | final orientation.
        
       | talkingtab wrote:
       | My fun was to try to get the widest underwater part with the
       | narrowest top showing above.
        
       | squarefoot wrote:
       | 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.
        
         | Someone wrote:
         | 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)
        
       | amelius wrote:
       | Now let a polar bear walk on it.
        
       | amelius wrote:
       | How do we know there is only 1 stable position?
       | 
       | (A perfect circle would have many, but you could consider that a
       | degenerate configuration.)
        
         | eternauta3k wrote:
         | There isn't necessarily just one. A rectangle-ish form could
         | have 4.
        
           | amelius wrote:
           | Yes, rectangle would also be degenerate. Basically any
           | configuration where adding an epsilon weight somewhere
           | generates a non-epsilon shift so to speak.
        
             | marcosdumay wrote:
             | You mean unstable?
        
       | sa46 wrote:
       | 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.
        
       ___________________________________________________________________
       (page generated 2024-06-09 23:01 UTC)