Re: [Algorithms] Solving a system of line equations -- Simple Version ; )
Brought to you by:
vexxed72
|
From: metanet s. <met...@ya...> - 2008-12-05 20:08:12
|
I've gotten the basic solver working, but I'm still struggling with how to deal with additional constraints, such as: -drive r[] values towards targets (minimize ||targ[i] - r[i]||) -enforce a minimum allowable r value (make sure r[i] > rmin) Currently I'm adding these as additional constraints the solver has to deal with; this makes sense for enforcing the minimum allowable value, but it seems wrong to drive r[] values towards targets using constraints, since they almost always directly "fight" with the main constraints.. causing the solver to fail to converge to a solution. Raigan --- On Fri, 12/5/08, metanet software <met...@ya...> wrote: > From: metanet software <met...@ya...> > Subject: [Algorithms] Solving a system of line equations -- Simple Version ; ) > To: gda...@li... > Received: Friday, December 5, 2008, 10:20 AM > My first form of this question was needlessly obtuse, this > version should be much more comprehensible! > > I have the following system: > http://www.harveycartel.org/raigan/system.jpg > > I'd like to solve for r0,r1,r2 such that s < t; > obviously setting r0=r1=r2=0 is a trivial solution; I'm > more interested in driving r0,r1,r2 towards target values > r0max,r1max,r2max while maintaining the constraint s < t. > > My current plan is to construct the constraint equation C = > s - t < 0 and then solve for the r values (by calculating > the partial derivatives of C wrt r[i] and doing a > non-linear-least-squares fit as in > http://www.matthiasmueller.info/publications/posBasedDyn.pdf > ). > > However even if this works, I have no idea how to > simultaneously minimize (rmax[i] - r[i]), i.e how I should > drive the r values towards target values while obeying C. > > Sorry for the totally obfuscated initial question.. thanks > for your time! > > Raigan > > p.s - Just in case it's not clear from the diagram, s > and t are the parametric times of intersection between > lines; each line is parallel to a segment (p[i+1] - p[i]) > and passes through the point p[i] + r[i]*Perp(p[i+1] - > p[i])/Len(p[i+1] - p[i]).. i.e each line is just a > linesegment offset along its normal. > > > > > __________________________________________________________________ > Looking for the perfect gift? Give the gift of Flickr! > > http://www.flickr.com/gift/ > > ------------------------------------------------------------------------------ > SF.Net email is Sponsored by MIX09, March 18-20, 2009 in > Las Vegas, Nevada. > The future of the web can't happen without you. Join > us at MIX09 to help > pave the way to the Next Web now. Learn more and register > at > http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list __________________________________________________________________ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now at http://ca.toolbar.yahoo.com. |