Live data from Hacker News

Gears

ciechanow.ski

41–50 of 230 posts

Re: Gears

#41

This may be a stupid question, but it is something I always wondered. Torque is effective due to the mass of the lever having a force applied to it, right? Is the length of the lever being used as a stand-in for the mass being affected (a longer lever would necessarily have more mass)? If the lever had no mass, would there be no torque? If the lever did not have a uniform mass distribution, would the difference in ap…

The mass of the lever just adds or subtracts from any other external force(s) applied to the lever - depending on the direction of the external force relative to the direction of gravity.

So a heavy wrench is helpful when pushing down, while loosening a rusty nut. But a light carbon fibre wrench would be better when pulling up.

How much torque gravity adds or subtracts in that case is also dependent on the distribution of mass along the length of the lever.

And to add to the fun, the mass of the leaver does add momentum into the equation, which comes into play as extra work required when changing speed of the rotation (e.g. starting, stopping the turn). And how much momentum also depends on the distribution of mass along the length of the lever.

Re: Gears

#42

Wow this is great OP! If you like this check out http://507movements.com/ - an animated webpage of 507 mechanical movements with descriptions from a classic book.

Came here to post that link :)

Re: Gears

#43
post #9
post #7

I'm going to add very little to this discussion, but it's the second article from this blog I've seen here, and - like the other one, about the Earth and the Sun - it's absolutely amazing. This is some of the finest work in "explorable explanations". I'm going to save the copy of both just to be sure to show them to my kid in a couple of years; this beats any educational material on the topic I've been exposed to bef…

It is indeed great, and probably one reason you don't see it more is that it's a ton of work! That's 5K lines of hand-written code! (view source and it's at the end of the page) $ wc -l gears.js base.js 4135 gears.js 904 base.js 5039 total I've wanted to make visualizations like this for my blog. Writing a blog post takes me around 10 hours, which is a fair amount of effort. I believe that the visualizations will tak…

Writing a small program takes much less effort per line than writing a large program, especially if it doesn't have to be maintainable and extensible, especially by other people. http://canonical.org/~kragen/sw/dev3/circlegrid.html only took me three hours of JS hacking, and it's like 200 lines of code. The simplified version of the basic COCOMO model in David A. Wheeler's "SLOCCount" is Person-Months = 2.4 * (KSLOC1.05), which suggests a budget of 0.44 person-months for this code, about two weeks, which is clearly too high; we've all written and debugged a few hundred lines of code in a day on some occasion after getting out of the larval stage. This probably would have been faster if I hadn't been so out of practice with DHTML.

Another thing, though, is that some things are easier than other things. Usually in a programming job you have to do the easy things and also the hard things. This brings down the average. If you're writing a bunch of blog posts for fun, though, you can just publish the ones where good visualizations came out pretty quickly and discard the others that are much more effort for less return.

I feel like visualizations using d3.js are still pretty "hand-written".

Re: Gears

#44

The illustrations are what draws attention and they are very nice and informative. In context of parallel HN discussion¹ on merits of animated SVG, I consider it a loss for open standards that these animations are not made in SVG. If you try to inspect this page, the design and animation is hidden behind canvas and some (nicely written BTW) imperative javascript. It is hard to replicate, and hard to compose with othe…

> The author is not to blame here, as we lack decent tools for declarative graphics/animations.

Please show me the pure SMIL declaration for a pixel-exact replica of the example from the wonderful article: number and size of teeth on a spinning gear scales based on the horizontal position of a draggable slider.

On a related note: this wonderful article is an article. The next time an HN article about web complexity triggers another HTML Class of 4.01 Reunion, it would be great if admirers of this article would post the link and force them to reveal the true depths of their asceticism.

I think I win either way. If there really is an SMIL solution then then the 4.01 grumps would be forced to backport declarative graphics/animation into their nostalgia. If not, then my point stands.

Re: Gears

#45
post #35
post #9

Earlier quoted context omitted.

It is indeed great, and probably one reason you don't see it more is that it's a ton of work! That's 5K lines of hand-written code! (view source and it's at the end of the page) $ wc -l gears.js base.js 4135 gears.js 904 base.js 5039 total I've wanted to make visualizations like this for my blog. Writing a blog post takes me around 10 hours, which is a fair amount of effort. I believe that the visualizations will tak…

Having been down this road, yes, it does take time, but you can save some time by using SVG and some DOM library. Although canvas is faster, most diagrams don't really need it, so I use SVG unless I really need to switch to canvas. SVG also adjusts for screen dpi automatically. The things I like: 1. Reactivity (ObservableHQ, Vue.js, hyperactiv.js, etc.). There's usually some underlying data and then a corresponding v…

Thanks for sharing these tips! I didn't realize you were trying out ObservableHQ too.

Re: Gears

#46
While I appreciate the beauty this piece, I can't help but think of the irony of such a complicated piece to explain something which mechanics and engineers, who actually use gears, understand completely intuitively.

Re: Gears

#47

While I appreciate the beauty this piece, I can't help but think of the irony of such a complicated piece to explain something which mechanics and engineers, who actually use gears, understand completely intuitively.

Why is it ironic? The target audience clearly is not mechanics and engineers who actually use gears.

Re: Gears

#48
post #35
post #9

Earlier quoted context omitted.

It is indeed great, and probably one reason you don't see it more is that it's a ton of work! That's 5K lines of hand-written code! (view source and it's at the end of the page) $ wc -l gears.js base.js 4135 gears.js 904 base.js 5039 total I've wanted to make visualizations like this for my blog. Writing a blog post takes me around 10 hours, which is a fair amount of effort. I believe that the visualizations will tak…

Having been down this road, yes, it does take time, but you can save some time by using SVG and some DOM library. Although canvas is faster, most diagrams don't really need it, so I use SVG unless I really need to switch to canvas. SVG also adjusts for screen dpi automatically. The things I like: 1. Reactivity (ObservableHQ, Vue.js, hyperactiv.js, etc.). There's usually some underlying data and then a corresponding v…

Observable is amazing! Some time ago, I prototyped half of the 2.0 version of a company's product in it in a scope of a few days; that's how nicely the notebook interface and reactive programming fit together.

I didn't realize Vue can work without a build step; that's actually great. While I so far avoided using any JS on my tiny little blog, I'd really like to do some interactive explanations. I'll check this workflow out. Thanks!

Last but not least, I'm a great fan of your articles! Keep up the great work!

Post reply on HN