Live data from Hacker News

Tearable Cloth Simulation in JavaScript

codepen.io

121–130 of 159 posts

Re: Tearable Cloth Simulation in JavaScript

#121
post #66

Earlier quoted context omitted.

Yes, I would find it impressive. Problem is, there's about a 5% chance I'd ever get to downloading and running it. Especially since it very likely wouldn't be compiled for mac or linux (the only systems I have) and I very very likely wouldn't feel inclined to compile it myself. That's why we love javascript demos. We're lazy sods.

In which case the impressiveness must be coming from the lack of domain familiarity. It's basically getting excited about a game physics 'Hello World'. I remember a good few years ago a colleague writing a fully textured 3D cloth sim that would remotely unfurl on your screen, displaying a given message on the cloth. He used it to display goatse.cx to me, which I wasn't very pleased about. This was developed in python…

Lack of domain familiarity?

Of course experts are not impressed by things they are familiar with. But usually experts are pleased that something has bought interest to people not familiar that domain. For example, people are still blown away by the sight of a far away galaxy in a telescope. Astronomers love this, they don't suggest such wonder is "odd" because they are used to it.

Re: Tearable Cloth Simulation in JavaScript

#122

Earlier quoted context omitted.

I agree. I think many people here are childish in their motivation. By acting in this churlish manner they try to show how great they are. To bolster their own self image. Sad.

Don't be preposterous. How is arguing that reworking existing code for the web isn't that interesting 'bolstering self image'? Are the people anonymously agreeing with me also ego-driven? You should consider that your post has zero content other than making a personal attack, which couldn't be said for the one you're criticising.

I think its not so much what you said, but how you said it.

The way I read it, is that by saying that you found it odd that people were impressed by this, it can be felt that you were implying that people impressed by this demo and code are some how backward in their knowledge or thinking. And by pointing that out, you must there for be implying your own superiority. So, bolstering self image and suggesting its ego driven fits with that.

Do you see what I mean?

You could have just said, "yeah very cool, and here is some additional info for those who are interested." But instead, you implied a negative value judgement on people who liked the demo and code. People don't like that much.

Re: Tearable Cloth Simulation in JavaScript

#123

Earlier quoted context omitted.

One of the nice things about a site like this is being exposed to domains that one is not familiar with. I for one know beans about physics simulations like this, so it is interesting. I suppose this is true, though the same could have been said for flash before Javascript's recent strides, and I don't recall anyone being particularly excited about similar demos implemented in actionscript.

Probably because: 1) HN wasn't that big (or existing) at that time. 2) Now you can also see the code, it's not in some opaque swt archive. 3) You don't need a proprietary Adobe IDE to code it (yes, you could do without for Flash too with some bizarro third party tools. Talking about the mainstream). 4) Everybody hates flash anyway.

^^

Re: Tearable Cloth Simulation in JavaScript

#126
post #25

Can anyone speak to what's going on in these algorithms? I'm interested in the physics/math behind them. For example, how much about partial differential equations do I need to know to understand them?

You don't need to know much (if anything) about PDEs. If you've taken an undergrad class in classical mechanics, you'll do just fine.

If you're interested specifically in game physics using Verlet integration, http://web.archive.org/web/20100111035201/http://www.tekniku... is a nice reference. Most of the springy-cloth demos use Verlet integration.

Here's a short series on 3D game physics that doesn't rely on a Verlet integration scheme: http://gafferongames.com/game-physics/. The advantage here is you get a more general ODE solver. It's a little bit more tricky to get right, though.

Once you dig a bit deeper into it, you'll find that the hard part is collision detection/response. A nice intro is the two tutorials at http://www.metanetsoftware.com/technique.html. An in-depth reference is Real-Time Collision Detection by Christer Ericson.

A community related to this is http://www.bulletphysics.org/Bullet/phpBB3/.

Re: Tearable Cloth Simulation in JavaScript

#127

Earlier quoted context omitted.

Don't be preposterous. How is arguing that reworking existing code for the web isn't that interesting 'bolstering self image'? Are the people anonymously agreeing with me also ego-driven? You should consider that your post has zero content other than making a personal attack, which couldn't be said for the one you're criticising.

I think its not so much what you said, but how you said it. The way I read it, is that by saying that you found it odd that people were impressed by this, it can be felt that you were implying that people impressed by this demo and code are some how backward in their knowledge or thinking. And by pointing that out, you must there for be implying your own superiority. So, bolstering self image and suggesting its ego d…

I don't think there's anything particularly clever about knowing about this algorithm or not. I find it odd when people are impressed by things implemented in one language/runtime when they wouldn't be impressed by it being implemented in another language/runtime. I find the excitement reserved for 'here's X implemented in JS' stories strange. To me it's basically the same story every time.

I realise that the HN readership includes a fair fraction of web developers in it's readership, so perhaps my view is in a minority. As others have said, if the link was to a technical discussion of the algorithm presented alongside a JS example implementation, it would have made more sense to me.

I do apologise if some took this as a personal slight.

Re: Tearable Cloth Simulation in JavaScript

#128
post #90

This is basically a rip-off and a direct port from this processing scetch: http://www.openprocessing.org/sketch/20140 the presentation is arguably nicer but i am a bit disappointed how it claims copyright and doesn't give attribution.

First thing I thought too. Bit of a shame

Re: Tearable Cloth Simulation in JavaScript

#129

Earlier quoted context omitted.

I agree. I think many people here are childish in their motivation. By acting in this churlish manner they try to show how great they are. To bolster their own self image. Sad.

Don't be preposterous. How is arguing that reworking existing code for the web isn't that interesting 'bolstering self image'? Are the people anonymously agreeing with me also ego-driven? You should consider that your post has zero content other than making a personal attack, which couldn't be said for the one you're criticising.

What's preposterous is the amount of effort you are putting into essentially saying "meh, boring" when you could have simply moved along to the next post that actually does interest you.

HN may not need every "look at the old stuff I did in JS" post, sure. But it needs these pointless "I didn't like this" derails even less.

Re: Tearable Cloth Simulation in JavaScript

#130
I was helping someone with this exact demo a few days ago. They wanted the demo so that it was an image that gets stretched appropriately with the "cloth":

http://stackoverflow.com/questions/15661270/html5-canvas-str...

I give a teeny explanation of the structure of the thing, but only enough to understand how to use an image instead of a wireframe.

Post reply on HN