|
From: | Juan Pablo Carbajal |
Subject: | Re: point projection on polyline |
Date: | Thu, 4 Feb 2016 15:00:01 +0100 |
Hi, I just reviewed your code.On Wed, Feb 3, 2016 at 2:43 PM, Juan Pablo Carbajal <address@hidden> wrote:On Wed, Feb 3, 2016 at 12:25 PM, rcharan51 <address@hidden> wrote:I have finally succeeded to hash out the unwanted area in the graph and
decreased the elapsed time. Thank you for the idea.
Also I modified the existing distancePointPolyline function to calculate
both orthogonal distance and projection without for loops !! (code:
https://bpaste.net/show/4b7886b58442). I have tested it, and it only works
for open polylines. For closed polylines it is not giving correct
projections. I am not able to figure where the problem is. Please go through
the code given above and let me know of my mistakes.
--
View this message in context: http://octave.1599824.n4.nabble.com/point-projection-on-polyline-tp4673298p4674624.html
Sent from the Octave - General mailing list archive at Nabble.com.
_______________________________________________
Help-octave mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-octave
Thanks a lot!I am happy to hear you succeeded. If you think you can provide a 2D hashing function, we could add it to geometry.I will check the code and update the package. I will add your copyright to the function.1. You do not need ot use ".-" or ".+" subtraction and addition are always element-wise.2. You can do inf (n,m) instead of inf*ones(n,m). I know David had it like that, but when I see this I correct it.3. Do not use varargin or varargout unless you need them. David also the habit of using them by default, but I correct it when I see it.4. For closed polys you need to add a point at the end. Check how projPointOnPolyline.m does it.I am now profiling your code to see if there is an advantage.
[Prev in Thread] | Current Thread | [Next in Thread] |