how to code the cirle in the function graph

Réponses (1)

John D'Errico
John D'Errico le 22 Oct 2022

0 votes

  1. If you have a point moving along the curve, then you can know the x value of that point.
  2. As well, compute y, at that x value. You must be able to do this, since you need to know the function itself.
  3. 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.
  4. 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.
  5. 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.
  6. Finally, civen the center of the circle, and its radius, draw the circle.
Just write the code. That is YOUR homework assignment, not mine.

Catégories

En savoir plus sur 2-D and 3-D Plots dans Centre d'aide et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by