👷♂️
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| beginfig(0); | |
| width:=100; | |
| rotation:=-40; | |
| pen calligraphypen; | |
| calligraphypen := makepen((0,0)--(width,0) rotated rotation); | |
| z0 = (300, 500); | |
| z1 = (x0, y0-150); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| beginfig(0); | |
| width:=100; | |
| rotation:=45; | |
| pen calligraphicpen ; | |
| calligraphicpen := makepen ((0, 0)--(width,0 ) rotated rotation) ; | |
| z0 = (x1+150, 0); | |
| z1 = (0, y0+250); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| verbatimtex | |
| \documentclass{minimal} | |
| \begin{document} | |
| etex | |
| beginfig(2); | |
| % Store the text in a picture variable | |
| picture p; | |
| p := thelabel("Another example", origin); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| beginfig(0); | |
| width:=100; | |
| rotation:=45; | |
| pen calligraphicpen ; | |
| calligraphicpen := makepen ((0, 0)--(width,0 ) rotated rotation) ; | |
| z0 = (x1+150, 0); | |
| z1 = (0, y0+250); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| beginfig(1); | |
| u := 1cm; | |
| % Нарисуем уровневые линии V1 и V | |
| draw fullcircle scaled 2.4u shifted (0,0) withpen pencircle scaled 1pt; % V | |
| label("$V$", (1.2u, 1.2u)); | |
| draw fullcircle xscaled 1.8u yscaled 1.2u shifted (0,0) withpen pencircle scaled 1pt; % V1 | |
| label("$V_1$", (0.8u, -1u)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| outputtemplate := "%j.eps"; | |
| beginfig(1); | |
| % Единица измерения | |
| u := 1cm; | |
| % Определяем точки | |
| pair center, left, right; | |
| center := (5u, 3u); | |
| left := (2u, 3u); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| beginfig(1); | |
| % randomseed := uniformdeviate infinity; | |
| randomseed := 2141.34242; | |
| numeric u, v; u = 5; v = 4; | |
| for n=1 upto 4: | |
| numeric x, y; x = y = 0; | |
| path w; w = (x, y) for i=1 upto 2048: | |
| hide(x := x + normaldeviate * u ; y := y + normaldeviate * v) | |
| .. (x, y) | |
| endfor; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| beginfig(0); | |
| numeric s; s = 10; | |
| %First a basic path (named atom) is defined, | |
| path atom; | |
| atom = origin | |
| -- (2s,0) rotated -30 -- (2s,0) rotated -30 + (0,s) | |
| -- ( s,0) rotated 30 -- ( s,0) rotated 30 + (0,s) | |
| -- (0,2s) -- cycle; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| vardef hexrgb(expr Spec) = | |
| save r, g, b; | |
| numeric r, g, b; | |
| r = hex substring (1,3) of Spec; | |
| g = hex substring (3,5) of Spec; | |
| b = hex substring (5,7) of Spec; | |
| 1/256(r,g,b) | |
| enddef; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| vardef hsl_color(expr h, s, l) = | |
| save chroma, hh, x, m; | |
| chroma = (1 - abs(2 * l - 1)) * s; | |
| hh = h / 60; | |
| x = chroma * (1 - abs(hh mod 2 - 1)); | |
| m = l - chroma / 2; | |
| if hh < 1: (chroma,x,0)+(m,m,m) | |
| elseif hh < 2: (x,chroma,0)+(m,m,m) | |
| elseif hh < 3: (0,chroma,x)+(m,m,m) | |
| elseif hh < 4: (0,x,chroma)+(m,m,m) |