Draw an iceberg and see how it would float in water
171–179 of 179 posts
Re: Draw an iceberg and see how it would float in water
#172I 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
#173Earlier quoted context omitted.
It's just potential energy minimization. A tall thin iceberg will float on its size in 2D or 3D.
That’s assuming the 2D representation is representative of near uniform density. In 2D an I-beam and and a solid beam look identical, but they don’t represent the same amount of mass for potential energy minimization. Play with 3D shapes and you could get identical 2D cross sections to float in arbitrary orientations.
Re: Draw an iceberg and see how it would float in water
#174Re: Draw an iceberg and see how it would float in water
#175Earlier quoted context omitted.
That’s assuming the 2D representation is representative of near uniform density. In 2D an I-beam and and a solid beam look identical, but they don’t represent the same amount of mass for potential energy minimization. Play with 3D shapes and you could get identical 2D cross sections to float in arbitrary orientations.
You can but only under very arbitrary situations that aren't common in real life. And if you're assuming it's not hollow and has constant density, then I doubt there's any way to make such an iceberg except if you look at it from one specific angle: looking from the side should give it away. Yet nearly every image of an iceberg seems to show them in that way.
Re: Draw an iceberg and see how it would float in water
#176Re: Draw an iceberg and see how it would float in water
#177Earlier quoted context omitted.
What parts of jquery in particular?
I think the Node querySelector $('selector'), attaching event listeners, getting and setting element width/height
Re: Draw an iceberg and see how it would float in water
#178Earlier quoted context omitted.
I think the Node querySelector $('selector'), attaching event listeners, getting and setting element width/height
My script template includes some things like `var $=a=>{return document.querySelector(a)}`, `...prototype.evt=(a,b)=>{var e=this.addEventListener(a,b);this.events=this.events||[];this.events.push(e);return e}` and a few other shortcuts. I generally do a mass search and replace to remove them before saving as sometimes i modify them, and conflicting userscripts isn't fun.
For example, jQuery.on('') also works with dynamically created elements. If you want that in vanilla JS you have to write more lines a code, I actually created a library/function for this specific use case: https://github.com/Cristy94/dynamic-listener