use imline() to draw a draggable line with fixed length
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Yinan Xuan
el 24 de Ag. de 2018
Comentada: Yinan Xuan
el 28 de Ag. de 2018
I have been thinking about using a position constraint function which is in circle shape with its center at one end of the line. In that case, I can drag the other end so that every drag will result in a line of length equal to radius of the circle. However, I only found makeConstrainToRectFcn which makes the constraint rectangle but not circle.
Or is there other way to achieve the same goals? Thank you very much!
0 comentarios
Respuesta aceptada
Naman Chaturvedi
el 28 de Ag. de 2018
Hello Yinan,
You can use the addNewPositionCallback function to acieve your constraint goal. The constraint function may calculate the slope of the line segment and accord to the radius and slope, find the position of second point.
Hope this helps.
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!