Quantcast
Viewing all articles
Browse latest Browse all 15

Re: problem improfile, imprecise line length

> To ensure that *both* N and the spacing (d) remain the same for each of
> the profiles, you would have to ensure that the euclidean distance between
> the start and the end points remain the same (as you note). From what I
> understand of your code, shouldnt it this distance between the start and
> end points of one yellow line be the same? (or maybe dx and dy need
> normalizing?).
>
Hey Ashish,
thank you for you quick reply.

That is my problem, I believe my dx and dy are correct.
rS being the spline curve on the 1px skeleton.
x = fnval(fncmb(rS,[1 0]),idx);
y = fnval(fncmb(rS,[0 1]),idx);
dx = fnval(fnder(fncmb(rS,[1 0])),idx); % derivative
dy = fnval(fnder(fncmb(rS,[0 1])),idx); % derivative

However, each line gives sllighty different profile length, I believe due to improfiles internal rounding, and my sf not being dynamic or the number of points along the profile (N) being dynamic for each profile with slightly different length.
I don't manage to code it to be exact or to find the best compromise (and how to code it;) all very confusing.. but it should be simple hehe).
Thanks for your time.

Viewing all articles
Browse latest Browse all 15

Trending Articles