Colorare un’area con Pstricks

  • Creatore
    Topic
  • #55844
    Up
    0
    Down
    ::


    Vorrei colorare l’area sotto il grafico della funzione, insomma il trapezoide A_3A_4A_1A_2. Ho seguito con grande fatica il manuale, ma il risultato non è quello voluto. Dove sbaglio?
    `\documentclass[12pt]{article}
    \usepackage[latin1]{inputenc}
    \usepackage[italian]{babel}
    \usepackage[a4paper,top=2.5 cm,bottom=2.5 cm,left=2.5 cm,right=2.5 cm,]{geometry}%includehead,includefoot
    \usepackage{amssymb,latexsym}
    \usepackage{amsmath}
    \usepackage{mathrsfs}
    \usepackage{mathabx}
    \usepackage{xypic}
    \usepackage{pst-plot}
    \usepackage{pstricks,pstricks-add,pst-math,pst-xkey,pst-func,pst-3dplot}
    \usepackage{pst-eucl}
    \usepackage{graphicx}
    \usepackage{color}
    \usepackage{cancel}
    \usepackage{float}
    \usepackage[format=hang,labelfont={bf},labelsep=quad]{caption}
    \usepackage{pifont}
    \usepackage{dsfont}
    \usepackage{fancyhdr}
    \usepackage{pict2e}
    \pagestyle{fancy}
    \lhead{}
    \chead{}
    \rhead{23 gennaio 2010}
    \lfoot{}
    \cfoot{\thepage}
    \rfoot{}
    \newtheorem{theorem}{Teorema}%[section]
    \newtheorem{lemma}[theorem]{Lemma}
    \newtheorem{corollary}[theorem]{Corollario}
    \newtheorem{definition}{Definizione}%[section]
    \newtheorem{observation}{Osservazione}%[section]
    \newtheorem{example}{Esempio}%[section]
    \newtheorem{proposition}[theorem]{Proposizione}
    \newtheorem{notation}{Notazione}%[section]
    \definecolor{light-blue}{rgb}{0.8,0.85,1}
    \definecolor{viola}{rgb}{0.9,0.2,0.9}
    \definecolor{marrone}{rgb}{0.75,0.25,0}
    \begin{document}
    \title{\textbf{\Huge{I limiti}}}
    \author{}
    \date{}
    \maketitle
    \section{}
    \begin{figure}[H]
    \center{\begin{pspicture*}(-3,-3)(11.5,9)
    \psset{xunit=1.cm,yunit=1.cm}
    \psaxes[labels=none,xAxis=true,yAxis=true,dx=0.7cm,dy=0.7cm,ticks=none]{->}(0,0)(-2.5,-2.5)(11,8)[$x$,-90][$y$,180]
    \psplot[algebraic,]{1.5}{8.5}{3*ln(x-1)}
    \pstGeonode[PosAngle=-90,dotscale=0.8,PointSymbol={*},PointName=none](4.79,0){P'}
    \pstGeonode[PosAngle=180,dotscale=0.8,PointSymbol={*},](0,4){Q}
    \pstGeonode[PosAngle=90,dotscale=0.8,PointSymbol={o},](4.79,4){F}
    \pstGeonode[PosAngle=90,dotscale=0.8,PointSymbol={none},PointName=none](0,0){O}(1.25,0){L}(0,1.25){M}(1,0){H}
    \pstGeonode[PosAngle=90,dotscale=0.8,PointSymbol={*},](6.75,5.25){A_1}
    \pstGeonode[PosAngle=180,dotscale=0.8,PointSymbol={*},](3.50,2.75){A_2}
    \pstGeonode[PosAngle=90,dotscale=0.8,PointSymbol={*},](3.50,0){A_3}(6.75,0){A_4}
    \pstLineAB[linestyle=dashed]{Q}{F}
    \pstLineAB[linestyle=dashed]{F}{P'}
    \pstTranslation[PosAngle=180]{O}{M}{Q}[R]
    \pstTranslation[PosAngle=180]{M}{O}{Q}
    \pstTranslation[PosAngle=-90,dotsize=0.1,PointSymbol={*},PointName=none]{O}{H}{P'}
    \pstTranslation[PosAngle=-90,dotsize=0.1,PointSymbol={*},PointName=none]{H}{O}{P'}
    \pstGeonode[PosAngle=90,dotscale=0.8,PointSymbol={*},](5.79,4.70){A_5}(3.79,3.08){A_6}
    \pstGeonode[PosAngle=180,dotscale=0.8,PointSymbol={*},](0,4.70){A_7}(0,3.08){A_8}
    \pstLineAB[linestyle=dashed]{A_5}{A_7}
    \pstLineAB[linestyle=dashed]{A_8}{A_6}
    \pstLineAB[linestyle=dashed]{A_6}{U'}
    \pstLineAB[linestyle=dashed]{A_5}{U}
    \def\f{\psplot[algebraic,]{1.5}{8.5}{3*ln(x-1)}}
    \def\g{\psplot[algebraic,]{-1}{8.5}{2.75}}
    \def\h{\psplot[algebraic,]{-1}{8.5}{5.25}}
    \def\l{\psplot[algebraic,]{-1}{8.5}{0}}
    %\psframe[fillstyle=solid,fillcolor=red,linestyle=none](S)(3.50,5.25)
    %\psclip{
    %\pscustom[linestyle=none]{
    %\moveto(0,2.75)\h\lineto(4,2.75)}
    %\pscustom[linestyle=none]{
    %\moveto(0,5.25)\g\lineto(4,5.25)}
    %}
    %\endpsclip
    %\psframe[fillstyle=solid,fillcolor=red,linestyle=none](A_2)(A_1)
    %\psclip{
    %\pscustom[linestyle=none]{
    %\moveto(A_3)\h\lineto(A_4)}
    %\pscustom[linestyle=none]{
    %\moveto(3.50,5.25)\f\lineto(A_1)}
    %}
    %\endpsclip
    \psframe[fillstyle=solid,fillcolor=yellow,linestyle=none](A_3)(A_1)
    \psclip{
    \pscustom[linestyle=none]{
    \moveto(A_3)\f\lineto(A_4)}
    }
    \endpsclip
    \psclip{
    \pscustom[linestyle=none]{
    \moveto(3.50,5.25)\l\lineto(A_1)}
    }
    \endpsclip
    \uput{6pt}[-105](U'){$x_0-\delta$}
    \uput{6pt}[-75](U){$x_0+\delta$}
    \uput{6pt}[-90](P'){$x_0$}
    \end{pspicture*}\vspace{0.5cm}}
    \caption{Hypotrochoid $\mathscr{C}$ obtained for the values $(R_1,R_2)=(5,3)$}
    \label{fig limite finito finito}
    \vspace{0.5cm}
    \end{figure}
    %
    %
    \end{document}`
    Inoltre, come si potrebbe rendere il colore di tale area trasparente? Dai manuali non ho capito praticamente nulla.
    Grazie a tutti

  • Devi essere connesso per rispondere a questo topic.

Go to top