Live data from Hacker News

Draw an iceberg and see how it would float in water

joshdata.me

71–80 of 179 posts

Re: Draw an iceberg and see how it would float in water

#71
post #9

I get interesting results if I draw a figure 8 (or a figure ∞). I wonder if it's treating one of the lobes as having negative density.

I spent... longer than I should have trying to take advantage of this bug to recreate a stable version of the stereotypical tall iceberg that the original tweet was complaining about.

https://imgur.com/a/WG6D0RJ

Re: Draw an iceberg and see how it would float in water

#72
I love the linked twitter page detailing the ... details of floating configurations for icebergs. My old mentor used to talk about how hard it was for the solvers to find stable configurations for floating bodies/structures/rubberDuckies “back in the old days”

Ah well... good times, and watch out for rotations that don’t matter!

Re: Draw an iceberg and see how it would float in water

#73
post #9

I get interesting results if I draw a figure 8 (or a figure ∞). I wonder if it's treating one of the lobes as having negative density.

The code must somehow compute bouyancy in a way that reflects the object's arbitrarily complex shape. It's likely carving the object up into some number of smaller primitive objects whose equations for bouyancy are known. In order to make the whole object move as one rigid body, though, it's probably computing force vectors for each primitive, and then summing them together based on the overall object's center of mas…

If anyone wants to do this, you're looking for "approximate convex decomposition": http://codesuppository.blogspot.com/2006/04/approximate-conv...

It was one of the grand challenges in the 00's, quietly solved by John Ratcliff. Then a few people solved it after him.

It's a fun algorithm. You basically slice and dice, like chopping a potato, then recombine small parts together based on a heuristic.

Re: Draw an iceberg and see how it would float in water

#74
post #9

I get interesting results if I draw a figure 8 (or a figure ∞). I wonder if it's treating one of the lobes as having negative density.

The code must somehow compute bouyancy in a way that reflects the object's arbitrarily complex shape. It's likely carving the object up into some number of smaller primitive objects whose equations for bouyancy are known. In order to make the whole object move as one rigid body, though, it's probably computing force vectors for each primitive, and then summing them together based on the overall object's center of mas…

I knew this was happening, but reading it, hey, maybe that's one way to get anti-gravity. Just loop the topology on itself. Obviously commenting in jest, but now I'm intrigued to see if someone has seriously considered this.

Re: Draw an iceberg and see how it would float in water

#75

Earlier quoted context omitted.

It’s interesting that proponents of a simpler web argue in favor of Jquery for a use case where jquery is in fact very easy to live without. One would almost think dogmatic thinking is involved.

> It’s interesting that proponents of a simpler web argue in favor of Jquery for a use case where jquery is in fact very easy to live without. One would almost think dogmatic thinking is involved. But to do without it, you will end up rewriting the shortcuts and utility functions that JQuery provides, effectively recreating a project-specific, less-tested and less-supported JQuery.

Yes agree completely and the same counter argument can be made for more advanced frontend frameworks.

Re: Draw an iceberg and see how it would float in water

#76

The twitter thread links to this article about stable equilibria explaining some of the physics https://physicstoday.scitation.org/doi/10.1063/PT.3.4373 which in turn links to this paper, E. N. Gilbert's How Things Float , which gives much more detailed mathematical explanation PDF: http://111.90.145.71/scimag/get.php?doi=10.2307/2325023&key=...

Another version of the pdf: https://pdfhost.io/v/im99v6oam_howthingsfloat1991pdf.pdf

Re: Draw an iceberg and see how it would float in water

#78

Draw a horizontal line under the water, then return back to its start with a wavy line crossing over the first line repeatedly. Very strange things happen. The first time i tried, it leapt out of the water then flapped around..

To trigger the behavior, it seems the waves need to be "asymmetric" in that if the leftest one is up, the rightest one needs to be down. Otherwise, it seems to behave normally.

Re: Draw an iceberg and see how it would float in water

#80
post #71
post #9

I get interesting results if I draw a figure 8 (or a figure ∞). I wonder if it's treating one of the lobes as having negative density.

I spent... longer than I should have trying to take advantage of this bug to recreate a stable version of the stereotypical tall iceberg that the original tweet was complaining about. https://imgur.com/a/WG6D0RJ

From left to right draw a sawtooth shape. Make the last one very wide. Then retrace your steps completing the other half of the sawtooth.

https://imgur.com/a/Kb8Y8zv

(there are about 4 completed saw tooths above the screen)

Post reply on HN