My question is different from that question. I'd like to randomly draw a number of dots with different colors and sizes, for example, 50 dots, 60 dots... It will be better if these dots can distribute in a circle.      \documentclass{article}     \usepackage{tikz,pgfmath}     \begin{document}     \thispagestyle{empty}     \begin{pgfpicture}     \pgfmathdeclarerandomlist{color}{{red}{blue}{green}{yellow}{white}}     \foreach \a in {1,...,50}{     \pgfmathrandominteger{\x}{1}{200}     \pgfmathrandominteger{\y}{1}{200}     \pgfmathrandominteger{\r}{5}{10}     \pgfmathrandomitem{\c}{color}     \pgfpathcircle{\pgfpoint{+\x pt}{+\y pt}}{+\r pt}     \color{\c!40!white}     \pgfsetstrokecolor{\c!80!black}     \pgfusepath{stroke, fill}     }     \end{pgfpicture}     \end{document}    Example output:
44123
I want to fill a part of a picture with more or less evenly and randomly distributed circles which should not overlap. It would be okay if circles are only partly inside the shape.  The density should be like what you see on this page  with values 80-100. (But I do not need so many circles, 30 should be enough, I could repeat the pattern).   I cannot use a grid and "wobble" the circles a bit: The circles are too large and it simply does not look randomly.   Currently I am thinking about a random attempt: Get some random point, measure its distance to existing circles, either paint or throw the point away. Try 100 times and hope that you get the right number of circles (and that it does not take too long). But perhaps someone has a better idea.   The example draws the circles simply manually:  \documentclass{article} \usepackage{tikz} \usetikzlibrary{backgrounds} \begin{document}   \begin{tikzpicture}[framed,gridded,radius=0.5cm]  \draw[red](0,0) rectangle (5,5);   \draw (1,1) circle;   \draw (2.3,1.1) circle ;   \draw (4.5,0.8) circle ;   \draw (5.1,1.8) circle ;   \draw (0.4,3.3) circle ;   \draw (2.1,2.8) circle ;   \draw (3.8,3.5) circle ;   \draw (4.8,4.2) circle ;   \draw (0.8,4.9) circle ;   \draw (2.1,4.1) circle ;   \draw (3.8,2.0) circle ;   \draw (3.5,0.6) circle ;   \draw (3.0,5.0) circle ;      \draw (4.1,5.1) circle ;             \draw (0.9,2.1) circle ;  \end{tikzpicture}  \end{document}
122521
I have a few circles in a drawing, and want to highlight some of them.  \begin{tikzpicture}  \coordinate (A1) at (0,0); \coordinate (A2) at (1,0); \coordinate (A3) at (1,1); \coordinate (B)  at (1,0);  \draw (A1) -- (A2); \draw (A1) -- (A3); \draw (B)  -- (A3);  \foreach \point in {A1,A2,A3,B} {    \fill [black,draw=white](\point) circle (3pt); }  \pgfsetstrokeopacity{.3} \pgfsetfillopacity{.3} \fill [red,draw,rounded corners,line width=9pt] (A1) -- (A2) -- (A3) -- cycle; \pgfsetstrokeopacity{1} \pgfsetfillopacity{1} \end{tikzpicture}   I would like the whole area surrounding the A points to be of the same color, but the strokeopaticy and the fillopacity interfere.  Is there some ay I can prevent this?  Note: in my actuall use scenario, there are too many coordinates for manual adjusting to be an option (otherwise I would just do with a fill with rounded corners, with points calculated manually).
119587
I have a pretty big binary matrix of maybe 70 rows and 64 columns. For ease of viewing, I would like to draw this matrix in TikZ where e.g. a 1 is represtented by a red square and a 0 is a white square. Does anyone have any idea how I could obtain this?  Ideally, I would have something where I can just load the matrix from a file and TikZ would handle everything else. Otherwise, I am also happy with a solution having to do find/replace every 0 by some string, and replace every 1 by another string.  Thank you in advance!  Example matrix:  10110101010 10010101010 01010111010 11110010100 01100011001 11101010111 10101010111
72806
I hope to draw a picture like this:    I find it difficult because   Each rectangle is similar in size, with multiple lines of text inside; Some of the upper right corner of the rectangle has some numbers; I can't deal with the four arrows fired from a rectangle IV; Do not know how to locate the rectangle X; I've never drawn this type of graph, no strategy.   Maybe my question violate of the norms of the Forum, but I don't have any other way.
118196
For example I have 10×10px icon. I want to produce 100 squares with correspondent color and location each. Actually, the question is how to make exact pixel mosaic out of raster image.  I tried Live Trace but it added some distortions to squares.
28875
Choose n points randomly from a circle, how to calculate the probability that all the points are in one semicircle? Any hint is appreciated.
32480
Say, we have 4 red balls, 4 blue balls, 4 green balls, 4 yellow balls. How many ways are there to form a sequence of 10 balls such that every color of ball occurs at least twice?  My thought: r = red b = blue g = green y = yellow * = undetermined  Every arrangments should in this form: rrbbggyy**  Case 1: two * are same  $\frac{\binom{4}{2}\binom{4}{2}\binom{4}{2}\binom{4}{2}\binom{4}{1}10!}{4!2!2!2!}$  Case 2: two * are different  $\frac{\binom{4}{2}\binom{4}{2}\binom{4}{2}\binom{4}{2}\binom{4}{2}10!}{3!3!2!2!}$  Result = Case 1 + Case 2  Any suggestions would be appreciated!
73718
My problem is: suppose I have an urn containing balls of $n = 10000000$ (i.e., $10^7$) different colors, with $1000$ balls of each color (so the total number of balls is $1000n = 10^{10}$). Suppose I draw $100000000$ (i.e. $10^8 = 10n$) balls. My question is:  how do I calculate the probability that I have drawn at least 90% (in this case $1000000$ or $10^6$) of the different colors?  Many thanks in advance
111498
I am trying to draw a special and contradictive plot : A circle with random distortions which have to remain constant regardless of how many times I build the document.  An example of what I am trying to achieve can be seen below    This figure was produced with the following code  \documentclass{standalone} \usepackage{tikz}    \usetikzlibrary{decorations.pathmorphing}   \begin{document}     \begin{tikzpicture}         % axes         \draw[ultra thin] (-2.5, 0) -- (2.5, 0);         \draw[ultra thin] (0, -2.5) -- (0, 2.5);         % undistorted sphere         \draw[ultra thin, dashed] (0, 0) circle (2.25cm);         \draw[ultra thin, dashed, -&gt;] (0:0) -- (125:2.25);         \node at (-1, 1) {$R$};         % distrorted sphere         \draw[very thick] plot[domain=0:350,smooth cycle ] (\x:2+rnd*0.5);         \draw[very thick, -&gt;] (0:0) -- (45:2.1);         \draw[ultra thin, -&gt;] (1, 0) arc (0:45:1);         \node at (1.2, 0.4) {$\theta$};         \node at (0.7, 1.25) {$R(\theta)$};     \end{tikzpicture} \end{document}   The problem with the code is that whenever I make a change to it and rebuild the document, the "distorted" circle will have a different shape, since I am using the rnd function. The reason I would like to have a constant-random shape is because I would like to denote its radius at an angle θ, therefore it has to touch the outline of the circle.  Any idea on how to achieve such a thing?
36716
Open to any and all suggestions / alternative layouts. Need to be able to cleanly circle a number inside of a table. Currently I have this (stolen from elsewhere) and it produces output as attached.    \usepackage{tikz}  \newcommand*\circled[1]{\tikz[baseline=(char.base)]{             \node[shape=circle,draw,inner sep=2pt] (char) {#1};}}  % A completed self assessment sheet (see end of this document). \section{Self Assessment}  \begin{table}[h] \begin{tabular}{llllllllllllll} Level 1 &amp; A &amp; 18 &amp; 0 &amp; 1 &amp; 2 &amp; 3 &amp; 4 &amp; 5 &amp; 6 &amp; 7 &amp; 8 &amp; 9 &amp; \circled{10} \\ Level 2 &amp; V &amp; 12 &amp; 0 &amp; 1 &amp; 2 &amp; 3 &amp; 4 &amp; 5 &amp; 6 &amp; 7 &amp; 8 &amp; 9 &amp; \circled{10} \\ Level 3 &amp; AA &amp; 10 &amp; 0 &amp; 1 &amp; 2 &amp; 3 &amp; 4 &amp; 5 &amp; 6 &amp; 7 &amp; 8 &amp; \circled{9} &amp; 10 \\ Level 4 &amp; S &amp; 12 &amp; 0 &amp; 1 &amp; 2 &amp; 3 &amp; 4 &amp; 5 &amp; 6 &amp; 7 &amp; \circled{8} &amp; 9 &amp; 10 \\ Level 5 &amp; I &amp; 10 &amp; 0 &amp; 1 &amp; 2 &amp; 3 &amp; 4 &amp; 5 &amp; 6 &amp; 7 &amp; \circled{8} &amp; 9 &amp; 10 \\ Level 6 &amp; S &amp; 10 &amp; 0 &amp; 1 &amp; 2 &amp; 3 &amp; 4 &amp; 5 &amp; 6 &amp; 7 &amp; \circled{8} &amp; 9 &amp; 10 \\ Level 7 &amp; C &amp; 6  &amp; 0 &amp; 1 &amp; 2 &amp; 3 &amp; 4 &amp; 5 &amp; 6 &amp; \circled{7} &amp; 8 &amp; 9 &amp; 10 \\ Level 8 &amp; R &amp; 16 &amp; 0 &amp; 1 &amp; 2 &amp; 3 &amp; 4 &amp; 5 &amp; 6 &amp; 7 &amp; \circled{8} &amp; 9 &amp;    \end{tabular} \end{table}
96757
I am trying to make something that looks like   I am trying to go from here (works):  \begin{tikzcd} A \arrow{r}\arrow{rd} &amp;B \arrow{d}\arrow[leftarrow]{r} &amp;C \arrow{ld}\\ &amp;D \end{tikzcd}   to here (doesn't work):  \begin{tikzcd} A \arrow{r}\arrow{rd} \arrow{rdd} &amp;B \arrow{d}\arrow[leftarrow]{r} &amp;C \arrow{ld} \arrow{ldd} \\ &amp;D &amp;E\\ \end{tikzcd}   I try many combinations but don't see how the tikz@x-y-z values work. Any help is appreciated.  Thanks,  Brian
98239
I would like to draw an image like the following.     This is what I've done so far (I used tikz, but any other package is welcome):  \documentclass{article} \usepackage{tikz}  \begin{document}     \begin{tikzpicture}         \draw[fill=blue] (.5,0) rectangle (4,2);         \draw[fill=red] (1,1) to[bend left=50] (3,1) to[bend left=50] (1,1);         \draw[fill=red] (3,1) -- (3.5,1.5) -- (3.3,1) -- (3.5,.5) -- cycle;         \draw[fill=white] (1.6,1.1) circle (.15cm);          \draw[fill=blue] (1.55,1.1) circle (.05cm);              \end{tikzpicture} \end{document}     Edit: April 2nd, Time for explanation  In Italy (but I also think in other countries), a practical joke done on April 1st is called "pesce d'Aprile" (= April's fish, that is an ) and is often related to fishes.  The usual one is to stick a drawing of a fish on someone's back without he/she realizes it.  Some years ago a colleague of mine stuck some "pesci d'Aprile" with written below "sono disponibile" (= I'm easy) on the rear of all the cars in our company car parking. Some other colleagues didn't realize it, and they had gone around with that drawing for days.  Another funny example happened in Milan . Someone put on the windshield of a lot of cars a false fine for illegal parking. On the fine sheet was written "per il pagamento rivolgersi agli uffici comunali di via Gadio, 2" (= for payment, please contact the municipal offices in via Gadio, 2), the address of the Civic Aquarium.  Hence, this question was simply a way to put    P.S. = Since I earned a lot of reputation points with this trick question, I decided to give them back to the Community awarding a bounty to the two answers posted on April, 1st.  Moreover, I accepted Robert's one since he guessed without spoiling, and I thank the other two answerers.  To the downvoters: you're probably technically right, but:   there's already too much sadness in the world, let's laugh now and then! humor is part of the LaTeX philosophy, Prof. Knuth himself docet if only serious questions are accepted, why did they create a fun tag?
59406
Suppose I have a complex figure made ​​with TikZ. How do I use it several times without having to repeat all the commands?  \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz}  \begin{document}  Base figure  \begin{tikzpicture}   \draw[blue] circle (2);   \foreach \i in {0,10,...,350}     \draw[blue] (\i:1.9) -- (\i:2.1); \end{tikzpicture}  Using base figure.  \begin{tikzpicture}   \draw[blue] circle (2);   \foreach \i in {0,10,...,350}     \draw[blue] (\i:1.9) -- (\i:2.1);   \foreach \i in {0,10,...,350}     \node at (\i:2.7) {\tiny $\i^\circ$}; \end{tikzpicture}  Using base figure.  \begin{tikzpicture}   \draw[blue] circle (2);   \foreach \i in {0,10,...,350}     \draw[blue] (\i:1.9) -- (\i:2.1);   \foreach \i in {0,10,...,350}     \draw (0,0) -- (\i:2); \end{tikzpicture}  \end{document}
106425
After reading , I was playing around to make a command to create a TikZ command with two inputs like this:  \documentclass[10pt,a4paper]{article}  \usepackage{tikz} \usetikzlibrary{calc}  \begin{document} \centering  \newcommand{\mitsubishi}[2]{ % #1 = radius % #2 = position x,y \pgfmathparse{2.966/7} \pgfmathparse{#1*\pgfmathresult}  \filldraw (#2) circle(#1 cm); % plate  \foreach \angle in {0,120,240}{ \filldraw[white,rotate=\angle] (#2)--++(60:\pgfmathresult)--++(120:\pgfmathresult)--++(-120:\pgfmathresult)--cycle; } }  \begin{tikzpicture} \mitsubishi{2}{0,0} \end{tikzpicture} \end{document}   but I have problems with the command \pgfmathresult inside the \filldraw command.  Why?
42937
I would like to place n points over a circumference like Figure 3 of this . I'd choose the label to be assigned to each vertex and color and I'd like to have the code in TikZ-pgf.
92377
I would like to draw a circle with a border containing two colors. One color should be the base color and the second color should fill up the border up to a certain percentage. For now I am only having this piece of code:  \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes} \newcommand*\circled[1]{\tikz[baseline=(char.base)]{         \node[shape=circle,draw,inner sep=2pt, thick] (char) {#1};}} \begin{document} \circled{85\%} \end{document}   Which draws a circle around the text:    What I want to achieve is this:
111231
What is the best way to draw a variable width line without using glLineWidth?  Just draw a rectangle?  Various  parallel lines? None of the above?