# Tag Info

0

Using the closed form solution for intersections: \documentclass[border=2pt]{standalone} \usepackage{mathtools} \usepackage{tikz} \begin{document} \begin{minipage}{4in} The circle is given by $$x^2 + y^2 = r^2$$ and the line by $$y = ax + b$$ where a = \frac{y_2-y_1}{x_2-x_1} \quad\...

3

For comparison, here is a Metapost solution (I am showing ConTeXt code, but it will work with standalone metapost or LaTeX + gmp): \starttext \startMPpage[offset=2mm] z1 = (-2.5,sqrt(2)*(-sqrt(7)+sqrt(13))*(-2.5)-sqrt(13)+2*sqrt(7))*cm; z2 = (1/sqrt(2), sqrt(7))*cm; z3 = (1.25, -sqrt(2)*(sqrt(7)+sqrt(13))*(1.25)+sqrt(13)+2*sqrt(7))*cm; path p, q; ...

4

At ridiculous computational cost, you can calculate the points where the circle intersects with the lines and use a clipping together with the even odd filling rule to produce This uses the intersections library, a scoped \clip and the even odd rule to create an unholy combination. \documentclass[border=10pt,multi,tikz]{standalone} \usetikzlibrary{...

0

I was able to achieve the following with a color wheel. I couldn't rotate the built in color wheel, so I copied one off the internet (image). I should note that the built in color wheel is very slow, so to get the desired shading one might as well bite the bullet and fill the triangle one line width at a time. \documentclass{standalone} \usepackage{tikz} \...

2

Here's how you do that in Metapost. There's no built-in gradient shading option, but you can draw lots of thin triangles with varying colours. prologues := 3; outputtemplate := "%j%c.eps"; beginfig(1); a = 20; pair A, B, C; A = origin; B = 120 right rotated a; C = 120 right rotated -a; path t; t = A--B--C--cycle; s = 1/4; for i=s step s until 2a: ...

Top 50 recent answers are included