\documentclass[border=10pt,pstricks,12pt]{standalone}
\begin{document}
\begin{pspicture}[showgrid](0,0)(3,3)
\pscircle*[linecolor=gray!20](1.5,1.5){1.5}
\pscircle[fillstyle=crosshatch*](1,2){1}
\pscircle[hatchcolor=gray,hatchsep=5pt,hatchwidth=.5pt,fillstyle=dots*](2,1){1}
\end{pspicture}
\end{document}
TikZ has option named crosshatch dots
, Asymptote has the same as TikZ, hatch(1.5mm,dotted+...)
. It means that dotted in line
As I see, the output image is not very good! So, how can I do to add dotted in line
for vlines,hlines,crosshatch,... in PSTricks?
I am drawing this picture with Asymptote but I have the mistake as follow:
// asy -f pdf <name>.asy
import math;
import patterns;
unitsize(1cm);
defaultpen(1);
pair C1=(-3,0),C2=(2.5,0);
real r=4;
path EllipseA=scale(.75,.55)*circle(C1,r);
path EllipseB=scale(.5,.35)*circle(C2,r);
add("fillA",hatch(1.5mm,red));
add("AinterB",crosshatch(2mm,green));
add("fillB",hatch(1.5mm,dotted+blue+1.5bp));//
fill(EllipseA,pattern("fillA"));
fill(EllipseB,pattern("fillB"));
picture AinterB;
fill(AinterB,EllipseA,white);
fill(AinterB,EllipseA,pattern("AinterB"));
clip(AinterB,EllipseB);
add(AinterB);
draw(EllipseA^^EllipseB);
label("$C$",C1,dir(180),UnFill);
label("$D$",C2,UnFill);
label("$E$",(0,0),UnFill);
pair A=point(EllipseA,1.25),B=point(EllipseB,.5);
label("$A$",A,6N);
label("$B$",shift(.2,0)*B,6N);
label("$G$",(0,2),9N); // dot((0,1));
draw(A--shift(0,.6)*A);
draw(B--shift(.2,.7)*B);
draw(shift(-2.5,.75)*(0,1)--shift(-.5,2)*(0,1));
draw(shift(.2,0)*(0,1)--shift(0,2)*(0,1));
draw(shift(1.5,0)*(0,1)--shift(.5,2)*(0,1));
add(shift(-6,-3)*grid(10,7,1bp+dotted));
shipout(bbox(5mm,white));
See add("fillB",hatch(1.5mm,dotted+blue+1.5bp));//
, if I replace 1.5mm by 1.2, I get the same output; if I replace 1.5mm by 1.75mm or 2mm, I have the true output as follow:
So, why are they different? It is the function in Asymptote or ...