Skewed slope of a perpendicular function.

In summary, the speaker is trying to fit a sine function to a general curve but is not getting the desired results with convolution. They have written code in Octave that uses the derivative of the function and the distance from a perpendicular line to the point of interest to solve for the points of interest. However, they are encountering issues when the derivative approaches zero. They share their math and explain their approach.
  • #1
Nugget_Mon
6
0
Hello,
I am trying to fit a sine function to a general curve. Convolution isn't giving me what I want, which is for every point on a general curve, displace that point by another function. I have written some code in Octave, and it's close, but not quite it.
What I did was to take a general function, take it's derivative at each point, took the inverse reciprocal for the slope of the perpendicular line to that point, set the distance to the point I wanted, then put the perpendicular line in point slope for to solve for the points of interest. The plot come close, but at the derivative approaches zero, so do the perpendicular points.

Code:
theta=[-2*pi:2*pi/1000:2*pi];#domain

z=4*theta.^3-36*theta.^2+14*theta+4;#general function
dz=12*theta.^2-72*theta+14;#derivative

d=0.5*cos(36*theta);#distance

x=((d.*dz)./(sqrt(dz.^2-1)))+theta;
y=-((x-theta)./dz)+z;

figure
hold on
#plot(theta,z)#un-comment for general plot.
plot(x,y)
hold off

What am I missing?
 
Physics news on Phys.org
  • #2
My math:
f(theta)= as above
f'(theta)= as above
(1) tan line: y-z=f'(theta)*(x-theta)
(2) perp line: y-z=(-1/f'(theta))*(x-theta)
(3) d=sqrt((x-theta)^2+(y-z)^2)

solve for y in (2) and sub into (3)
d^2=(x-theta)^2+((theta-x)/f'(theta)+z-z)^2
Simplify
d^2=(x-theta)^2*(1-1/f'(theta)^2)
Simplify
sqrt((d^2*f'(theta)^2)/(f'(theta)-1))=x-theta
Solve for x
d*f'(theta)/sqrt(f'(theta)^2-1)+theta=x
Then sub into perpendicular point slope form and solve for y.
 

Related to Skewed slope of a perpendicular function.

1. What is a "skewed slope" in a perpendicular function?

A "skewed slope" refers to a slope that is not perpendicular to the x-axis. In other words, it is not at a 90-degree angle to the x-axis.

2. How can you determine the degree of skewness in a perpendicular function?

The degree of skewness in a perpendicular function can be determined by calculating the slope of the function and comparing it to the slope of a perpendicular line. If the two slopes are not equal, then the function has a skewed slope.

3. What causes a skewed slope in a perpendicular function?

A skewed slope in a perpendicular function is typically caused by the presence of an external force or factor that is influencing the direction of the slope. This could be due to a variable in the function, or an external factor such as gravity or wind.

4. Can a perpendicular function have a positive or negative skewed slope?

Yes, a perpendicular function can have either a positive or negative skewed slope. A positive skewed slope means that the slope is slanting upwards from left to right, while a negative skewed slope means that the slope is slanting downwards from left to right.

5. How does a skewed slope affect the overall shape of a perpendicular function?

A skewed slope can significantly alter the overall shape of a perpendicular function. It can cause the function to appear tilted or uneven, and can also impact the behavior of the function at different points. In some cases, a skewed slope may even make the function non-perpendicular.

Similar threads

Replies
3
Views
1K
Replies
4
Views
593
Replies
6
Views
2K
Replies
4
Views
2K
Replies
16
Views
2K
Replies
5
Views
1K
Replies
21
Views
2K
Replies
2
Views
2K
  • Calculus
Replies
7
Views
1K
Back
Top