TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: A rough simulation of a sail boat (2D Wireframe)

6 pointsby imakesnowflakesover 9 years ago
Link : http:&#x2F;&#x2F;firstglitch.com&#x2F;html_projects&#x2F;sailboat&#x2F;sail-gl.html<p>This is a very rough simulation of a sail boat (2D wireframe), that you can sail using force of &quot;wind&quot; (modeled as a million particles, animated using webgl) striking on the sails. The position of the wind particles and the forces of the particles striking on the sails is computed in WebGL shaders.<p>The forces are NOT re-calculated at each frame. Which might cause some artifacts. For example, the boat might start moving after the wind has passed, if you continue adjusting the rudder and sail angle.<p>You can adjust rudder using q&#x2F;w keys and sail angle using o&#x2F;p keys.<p>See if you can sail into the wind, by finding the right combination of sail angle and rudder. It is a bit hard. Adjusting rudder and sail to changing wind directions can be challenging. But it should be fun once you figure it out.

2 comments

teleclimberover 9 years ago
I&#x27;m sure that was hard work and I commend you for it, but as an aerospace engineer who happens to enjoy sailing (windsurfing in particular) I can&#x27;t help but mention that you would get far more realistic simulation (with far less processor usage) simply by looking at the Lift-over-Drag curves for sails (or airfoils) at that regime and do a simple Forces calculation at each frame. Wind does not behave anything like particles!
评论 #10213318 未加载
jml3onover 9 years ago
simulation looks nice but the random wind is annoying: it doesn&#x27;t give enough time to play with the boat and test if it does what it&#x27;s supposed to. would be better with control of the wind (direction + strength).
评论 #10212275 未加载