Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

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

1 visualización (últimos 30 días)
Zita Hagemann
Zita Hagemann el 19 de Sept. de 2019
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
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 comentarios
darova
darova el 19 de Sept. de 2019
You want hatch pattern?
What about patch()?
Zita Hagemann
Zita Hagemann el 19 de Sept. de 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?

Respuestas (1)

darova
darova el 19 de Sept. de 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!

Translated by