how to code the cirle in the function graph
이전 댓글 표시
how to code the cirle tangent to function graph when i move mouse on the graph 

답변 (1개)
John D'Errico
2022년 10월 22일
0 개 추천
- If you have a point moving along the curve, then you can know the x value of that point.
- As well, compute y, at that x value. You must be able to do this, since you need to know the function itself.
- Next, again, you know the function. It appears to be a sinusoid, with a linearly increaing amplitude. So you can compute the derivative, at that same value of x.
- Knowing the derivative of the curve at that point (the slope of a line tangent to the curve), that slope allows you to compute the slope of a curve normal to the tangent. Just comute the negative reciprocal of the tangent slope, to give the slope of the normal to the curve.
- Next, Given the known radius of the circle, Find a point that lies at that exact distance from the currrent point, at that slope. This will be the center of the circle.
- Finally, civen the center of the circle, and its radius, draw the circle.
Just write the code. That is YOUR homework assignment, not mine.
카테고리
도움말 센터 및 File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!