Create impoly starting at specific point

3 views (last 30 days)
Erik
Erik on 10 Dec 2013
Edited: KSSV on 23 Apr 2019
Hey there!
Is there a way to draw a polygon using impoly that starts at one previously defined point?
I can use impoly to create a polygon object that I create by clicking on an image and retrieve the coordinates like in the following example:
figure, imshow('gantrycrane.png'); h = impoly(gca,'closed',false); wait(h)
I can also pre-define a polygon and only change it interactively using
figure, imshow('gantrycrane.png'); h = impoly(gca,[10 10; 20 10],'closed',false); wait(h)
The problem with example one is that there is no starting point constraint. The problem with example two that it does not allow the extend the polygon by clicking (I know I could add vertices by pressing the 'a' key while the pointer is on the object). I like to draw a polygon like in example one by clicking on an image that starts at a given point like in exmaple two. I guess there must be a way to make the polygon 'active' again (like it is in example one) using its handle. Does anybody know if this is possible?
Thanks a lot! Erik
  1 Comment
mohammad ibrahim
mohammad ibrahim on 23 Apr 2019
Hello Eric
I have the same question, I would like to know if you ahve solved this issue ?
many thanks
Mike

Sign in to comment.

Answers (0)

Categories

Find more on Data Import and Analysis in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!