Some queries about Prismatic joint

Posts regarding potential bugs, enhancement requests, and general feedback on use of dyn4j
maheshkurmi
Posts: 60
Joined: Tue Mar 27, 2012 7:20 am
Location: India
Contact:

Some queries about Prismatic joint

Postby maheshkurmi » Mon Dec 07, 2015 1:51 am

1. In dyn4j prismatic joint axis is defined in frame of body 1

Code: Select all

   // get the axis in local coordinates
      this.xAxis = body2.getLocalVector(n);
      // get the perpendicular axis

while in box2D it is in frame of body 2
The joint axis is the line along which the bodies can move relative to each other. It is specified in bodyA's local coordinates, so you could think of it as the direction bodyB can move from bodyA's point of view.

Is it intentional?

2. in dyn4j prismatic joint there is single local anchor point (actually in only defined constructor, same world point is used to create two local anchor points), while in box2D there are 2 local points, why it is so?

William
Site Admin
Posts: 345
Joined: Sat Feb 06, 2010 10:23 pm

Re: Some queries about Prismatic joint

Postby William » Mon Dec 07, 2015 11:00 am

  1. It wasn't intentional to make the axis fixed in body A or B's space. Instead, it was arbitrarily chosen when I did my own derivation of the joint here.
  2. They look the same to me, am I missing the question? Both dyn4j & box2d (b2PrismaticJointDef::Initialize) accept one world space anchor point and then create, internally, two local space anchor points.

William

maheshkurmi
Posts: 60
Joined: Tue Mar 27, 2012 7:20 am
Location: India
Contact:

Re: Some queries about Prismatic joint

Postby maheshkurmi » Tue Dec 08, 2015 11:35 am

Ok got it...
Actually dyn4j does't allow to change local anchor point while box2d does so. What if we want to define local anchor points of both bodies separately, without bringing desired local point to common point.

Meanwhile I have created separate eclipse test project for dyn4j library using graphicsRenderer2D with support for mouse drag zoom etc. Just add dyn4j.jar to its build path.
If you like it , you may make it available publically.
regards..
Attachments
dyn4jSamples.7z
(255.97 KiB) Downloaded 85 times

William
Site Admin
Posts: 345
Joined: Sat Feb 06, 2010 10:23 pm

Re: Some queries about Prismatic joint

Postby William » Wed Dec 09, 2015 7:17 am

maheshkurmi wrote:What if we want to define local anchor points of both bodies separately, without bringing desired local point to common point.

What would be the goal for being able to change these?

maheshkurmi wrote:Meanwhile I have created separate eclipse test project for dyn4j library using graphicsRenderer2D with support for mouse drag zoom etc. Just add dyn4j.jar to its build path.
If you like it , you may make it available publically.
regards..

Cool, did you use the new samples framework classes? I really like the ragdolls in the Cyclist sample.

William

maheshkurmi
Posts: 60
Joined: Tue Mar 27, 2012 7:20 am
Location: India
Contact:

Re: Some queries about Prismatic joint

Postby maheshkurmi » Wed Dec 09, 2015 12:46 pm

I just created the samples using code exporter in physics simulator I am working on . i will submit few more soon.


Return to “Bugs, Enhancements, Feedback”

Who is online

Users browsing this forum: No registered users and 1 guest