New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for boundary spinning #8

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@cwgreene

cwgreene commented Apr 23, 2013

This also contains some code that will make it easier to define arbitrary boundaries for lines.

Bounds checking modified to remove spinning
By having the particles stop at the first point where they
cross the boundary line, we prevent the artificial torque
exerted on the semi-rigid body.
@subprotocol

This comment has been minimized.

Show comment
Hide comment
@subprotocol

subprotocol Apr 24, 2013

It is calculating the intersection point correctly, but it doesn't appear to be reflecting from the surface. So before it slid, in this commit it sticks, but I believe the end goal is to have it reflect. Is this correct?

Would it make sense to add an reflectionPoint function to calculate?

The reflection vector will also want to be multiplied by this.groundFriction. When this.groundFriction is 0, it would exhibit how this is currently implemented. It may make sense to rename it from groundFriction to something like surfaceFriction. Do you think this make sense?

subprotocol commented on js/verlet-js/verlet.js in 78090c2 Apr 24, 2013

It is calculating the intersection point correctly, but it doesn't appear to be reflecting from the surface. So before it slid, in this commit it sticks, but I believe the end goal is to have it reflect. Is this correct?

Would it make sense to add an reflectionPoint function to calculate?

The reflection vector will also want to be multiplied by this.groundFriction. When this.groundFriction is 0, it would exhibit how this is currently implemented. It may make sense to rename it from groundFriction to something like surfaceFriction. Do you think this make sense?

@subprotocol

This comment has been minimized.

Show comment
Hide comment
@subprotocol

subprotocol Apr 24, 2013

Owner

This is great! One comment is inline. Also:

I appear to be using tabs for spacing. It looks like your editor is using spaces. Could you switch to use tabs so that the indentations match?

line 165: https://github.com/cwgreene/verlet-js/blob/master/js/verlet-js/verlet.js we may no longer need this block, as I think the groundFriction would be moved into your bounds function.

Owner

subprotocol commented Apr 24, 2013

This is great! One comment is inline. Also:

I appear to be using tabs for spacing. It looks like your editor is using spaces. Could you switch to use tabs so that the indentations match?

line 165: https://github.com/cwgreene/verlet-js/blob/master/js/verlet-js/verlet.js we may no longer need this block, as I think the groundFriction would be moved into your bounds function.

@cwgreene

This comment has been minimized.

Show comment
Hide comment
@cwgreene

cwgreene Apr 26, 2013

Sure, hopefully can get around to it this weekend.

cwgreene commented Apr 26, 2013

Sure, hopefully can get around to it this weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment