Advertisement

Rope and sails?

Started by January 17, 2016 03:01 PM
7 comments, last by _WeirdCat_ 9 years ago

sails.jpg

so basically i would like to attach both ends of the rope to some lets say static points (not movable) and want the rope behave liek a rope that means like on pic on the right.

i need this to hold sails in place ;] like on the left picture. (note thateach side of red triangle is different rope, same for green rope attached to hull), it shows rope with full tension and middle image shows that rope without tension. i need to simulate that, knowing that two end points are attached to something.

Would it be an option to make the sail behave like a (fixed) wind vane? One side always wants to point itself towards the wind. The only thing holding it back is the rope.

Advertisement

Two things here:

First thing - As a seasoned sailer (viking ships) I'd like to point out that there is much more to sails than "the wind fills it like a bag and pushes the ship forward". What accellerates the ship is really the sucktion created *in front of* the sail, not the wind caught behind it. Sailships move considerably faster when the wind hits the sail edge-on, at a less-than 90 degree angle to the direction the ship is sailing in, than when the ship moves directly down wind, and the sail is expanded by the wind like a balloon. In other words, a sailship will move much faster at - say - 40 degrees up against the wind than with the wind coming directly from behind! Programming this is going to be non-trivial.

Second thing - Ropes and sail (cloth) can easily be programmed with point masses and springs. If you implement an iterative method you'll get incredibly stable and rigid materials. I can give you some small, fuctional code samples to work with, but you may have to translate them to your own preferred programming language.

Cheers, Mike

yeah code would be good, as i mentioned earlier i need to simulate rope not sail, sail only moves rope that is attached to some fixed non movable end points (to make it easier), so then i can calculate the maximume translation of rope points between those two endpoints and fix cloth poisition. - wait i maybe wrote that wrong ;x - consider rope is undestructable it will bend somehow to some value and rope length wont change, this will help me position the cloth.

lets say i have a rope that has 4 control point two fo them are end points that are not movable, now i apply a force to one of movable points lets say 1 million kilojoules (it should crack but dont mind our rope has godmode on) now those two control points will move only to some value and they wont deattach.

in my case ill do that: move cloth by wind, then whenever cloth point is attached to rope, check if it extends the rope ability to be bend and if yes correct the position of rope and cloth

If you are just looking to simulate rope physics, then there are tutorials and reference materials all over the internet.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

yeah i am looking at nehe code sample. but i am unable to make two end points to rest at position.

I encountered set of problems i would like you to see the video and i will explain (video consists of 3 parts)

first i have a rope and i bend it by changing center point velocity, but thats not the problem, as you can see both end points remain static - i am not sure if i done that properly because i just stopped to calculate forces (and new position and velocity for those two)

second is when i translate right end point of the rope it starts to behave like mad plus when i additionally move the rope end point it extends to infinity..

third most serious problem: i take 3 center points and translate one by 1 meter second by 0.3 meters and third by 0.75 meters and i get that (its not that gentle like by changing the velocity), now i could find a proper velocity for that using v = s/t formula, but it seems such solution is too complex, because i would like to move those points (change their positions by connected cloth points) i am not sure if anyone understands that. it seems that correcting the rope position (connected to cloth) would be the easiest way but then i get oscillation terror

Advertisement

I think i wont do multiple contact connections for sail and rope and use only one point for each rope but we'll see in future:

1 rope attached

2 ropes attached

watch the second one with fullscreen

yeah code would be good, as i mentioned earlier i need to simulate rope not sail, sail only moves rope that is attached to some fixed non movable end points (to make it easier), so then i can calculate the maximume translation of rope points between those two endpoints and fix cloth poisition. - wait i maybe wrote that wrong ;x - consider rope is undestructable it will bend somehow to some value and rope length wont change, this will help me position the cloth.

lets say i have a rope that has 4 control point two fo them are end points that are not movable, now i apply a force to one of movable points lets say 1 million kilojoules (it should crack but dont mind our rope has godmode on) now those two control points will move only to some value and they wont deattach.

in my case ill do that: move cloth by wind, then whenever cloth point is attached to rope, check if it extends the rope ability to be bend and if yes correct the position of rope and cloth

Hello again! Simulating rope and sail are very similar, since a sail would simply be a tri- or quad-mesh of interconnected point masses and springs. Also, things doesn't work like you describe above. The ropes hold the sail up via the mast or masts, and transfer the wind-force applied on the sail to the hull of the ship. There are no "fixed points" that doesn't move. If your ropes are so soft and rubbery that they can't be used to propagate forces (that's what it looks like), then your simulation won't work. If you want a real physics simulation you'll have to start by reading up on how sailships work, because it's not as simple as you appear to think it is.

As for the problems you experience with your ropes: it appears that you use way too many point masses in them, since you have waves moving up and down through them, every time you move the fixed points. Also, the instability and oscillation you experience is notorious for bodies of interconnected springs. It can be removed by using more damping or less stiffnes, but the best way is to make an iterative solution.

Sorry in advance if I misunderstand you, I don't want to sound harsh or patronizing. :-)

Also, I promised you a code sample which is on its way. Cheers, Mike

actually i don't need the code now, i am happy with what i have.

This topic is closed to new replies.

Advertisement