LaTeX forum ⇒ Graphics, Figures & Tablesfilling a region Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
kent
Posts: 31
Joined: Thu Oct 20, 2016 3:41 pm

filling a region

Postby kent » Thu Nov 02, 2017 1:58 pm

See the attached latex code where I would like to shade the region between the drawn parabola and ellipse.
Anybody knoes how to do this?
I have tried several combinations using \clip, \scope etc. without success.
Best regards,
Kent
Attachments
forum.tex
(1005 Bytes) Downloaded 23 times
forum.pdf
(3.88 KiB) Downloaded 5 times

User avatar
Stefan Kottwitz
Site Admin
Posts: 8525
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Thu Nov 02, 2017 5:07 pm

Hi Kent,

start, filling between ellipse and parabola2, adding:

  1. \begin{scope}
  2. \clip (S) ellipse (\a cm and \b cm);
  3. \filldraw[rotate=90,fill=yellow] (T) parabola (PP2) -- (9,0);
  4. \end{scope}



Stefan
Site admin

kent
Posts: 31
Joined: Thu Oct 20, 2016 3:41 pm

Postby kent » Thu Nov 02, 2017 8:17 pm

Stefan, thanks for help!
May be I was not precise enough to define what I wanted to achieve.
I want the shading to be as indicated in black in the attached file.
Kent
Attachments
image2017-11-02-191233.pdf
(51.41 KiB) Downloaded 4 times

User avatar
Stefan Kottwitz
Site Admin
Posts: 8525
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Thu Nov 02, 2017 8:30 pm

Ok, then this should do it:

  1. \begin{scope}
  2. \clip (S) ellipse (\a cm and \b cm);
  3. \filldraw[rotate=90,fill=yellow] (T) parabola (PP2) -- (-5,0);
  4. \filldraw[rotate=90,fill=yellow] (T) parabola (PP) -- ( 5,0);
  5. \end{scope}


ellipse.png
ellipse.png (11.45 KiB) Viewed 122 times


Stefan
Site admin

kent
Posts: 31
Joined: Thu Oct 20, 2016 3:41 pm

Postby kent » Fri Nov 03, 2017 7:44 pm

Thank you very much!
Your support is highly appreciated.


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: Bing [Bot] and 6 guests