Info

This question is closed. Reopen it to edit or answer.

how can i create a circle with a radius leading to a point p with a tangent on the point p?

1 view (last 30 days)
I need a script to create a circle from a fixed point defined ๐‘ฅ = ๐‘Ÿ cos ๐œƒ + ๐‘ฅ0 ๐‘ฆ = ๐‘Ÿ sin ๐œƒ + ๐‘ฆ0 with a radius plotted between (๐‘ฅ0, ๐‘ฆ0 ) and (๐‘ฅ๐‘ƒ, ๐‘ฆ๐‘ƒ ) and a tangent line (๐‘ฅ๐‘ก , ๐‘ฆ๐‘ก) are defined as follows: When ๐‘ฆ๐‘ƒ โ‰  ๐‘ฆ0 ๐‘ฅ๐‘ƒ โˆ’ 2 โ‰ค ๐‘ฅ๐‘ก โ‰ค ๐‘ฅ๐‘ƒ + 2 ๐‘ฆ๐‘ก = ๐‘š๐‘ก (๐‘ฅ๐‘ก โˆ’ ๐‘ฅ๐‘ƒ ) + ๐‘ฆ๐‘ƒ, When ๐‘ฆ๐‘ƒ = ๐‘ฆ0 ๐‘ฅ๐‘ก = ๐‘ฅ๐‘ƒ ๐‘ฆ๐‘ƒ โˆ’ 5 โ‰ค ๐‘ฆ๐‘ก โ‰ค ๐‘ฆ๐‘ƒ + 5.
The MATLAB script must include the following: โ€ข User input for o The radius of the circle o The coordinates of the centre of the circle o The coordinates of the point ๐‘ƒ โ€ข All calculations, including the calculation for the gradient of the tangent โ€ข The commands to: o Create a single figure containing all three lines/curves o Create a legend on the figure o Label the figure axes o Choose appropriate limits for the axes to ensure the circle does not touch the axes at any point o Set the aspect ratio of the figure to be 1:1 (use the MATLAB help to find the correct command to do this) โ€ข Comments describing the code

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!