help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dilation operation on vector


From: PetrSt
Subject: Re: Dilation operation on vector
Date: Mon, 25 Mar 2013 11:54:39 -0700 (PDT)

I'm not sure what do you mean by dilation problem, but I guess there is
hardly any octave function dealing exactly your problem. I think, it is
about defining and solving purely mathematical problem.
Firstly, the center of wheel [xc,yc] should lie on the line perpendicular to
surface. Eguation of normal to line at point [x,y] is: (x-xn) + dy/dx (y-yn)
= 0, where [xn,yn] are points lying on the normal, thus [xc,yc] must satisfy
this equation.
Secondly, the distance of [xc,yc] from any [x,y] must be greater or equal
r^2, where r is radius of the wheel, i.e. (x-xc)^2 + (y-yc)^2 >= r^2.
If we have independent spatial coordinate x, elevation y is function of x
(y=f(x)), and we know the derivation of this function y' = dy/dx = df(x)/dx,
then the 1st condition gives
yc = y + (x-xc)./y'
and the 2nd
xc >= x - y'*r/sqrt(y'^2+1)
You can try
x=0:pi/100:2*pi; f=sin(x); df=cos(x);
r=1;
xc = x-df.*r./sqrt(df.^2+1); yc = f + (x-xc)./df; plot(x,f,'-',xc,yc,'.');
Note, that with increasing r arises abundant loop in the region of x with
positive second derivative, which is caused by using simple condition xc = x
- y'*r/sqrt(y'^2+1), instead of xc >= x - y'*r/sqrt(y'^2+1) for all x. Also
in points with y'==0, xc=x, which is not correct.



--
View this message in context: 
http://octave.1599824.n4.nabble.com/Dilation-operation-on-vector-tp4651186p4651206.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]