Info

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

How to color the area between lines that are vectors, no functions

1 view (last 30 days)
I have to figures who are intersecting. If you look at the picture I have one vector describing the upper blue curve, one for the lower. The same for the red ones.
I want to color now the common area. I have also vectors for the upper part of this green area and for the lower.
Somehow I don't find a way to color this area without making a function out of the vectors. (for this example I used paint in the picture).
Has anyone an idea how to color this green area when having data points and no function?
Kind regards
Zita
  2 Comments
Zita Hagemann
Zita Hagemann on 19 Sep 2019
it would be great if it is hatch pattern, patch is working with filling completely. That is already great, thanks!
But do you also know how to get hatch pattern then?

Answers (1)

darova
darova on 19 Sep 2019
I created some figure and lines
img1.png img2.png
I rotated lines and created new figure (yellow)
img3.png img4.png
Painted faces to white and removed edges
set(h,'EdgeColor','none','FaceCOlor',w)
img5.png
TO create yellow figure i had to numerate vertices:
img6.png
See the attached script
Look also here: POLYSHAPE

Community Treasure Hunt

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

Start Hunting!