Skip to content

Instantly share code, notes, and snippets.

View santhoshtr's full-sized avatar
👷‍♂️
Work in progress

Santhosh Thottingal santhoshtr

👷‍♂️
Work in progress
View GitHub Profile
@santhoshtr
santhoshtr / main.mp
Last active February 14, 2026 04:20
Untitled Metapost Sample #metapost-sandbox
beginfig(0);
width:=100;
rotation:=-45;
pen calligraphicpen ;
calligraphicpen := makepen ((0, 0)--(width,0 ) rotated rotation) ;
z0 = (x1+150, 0);
z1 = (0, y0+250);
@santhoshtr
santhoshtr / main.mp
Created February 13, 2026 10:05
Untitled Metapost Sample #metapost-sandbox
% 设置输出文件名
outputtemplate := "%j.svg";
beginfig(1);
% --- 1. 变量声明 ---
numeric u, hex_R, hex_W;
numeric stem_w, bar_h, f_top_y;
color main_color;
path boundary_path;
picture fh_pattern;
@santhoshtr
santhoshtr / main.mp
Created February 13, 2026 10:04
korean_flag #metapost-sandbox
beginfig(1);
u := 1mm;
radius := 50u; % 태극의 반지름 (R)
diameter := 2radius; % 태극의 지름 (D = 100u)
height := 200u;
width := 300u;
pair O; O := (width/2, height/2); % 국기 중심
% 1. 표준 비율 설정 (대한민국 국기법 규정)
@santhoshtr
santhoshtr / main.mp
Created February 13, 2026 10:04
Untitled Metapost Sample #metapost-sandbox
prologues := 3;
outputtemplate := "%j-%c.mps";
beginfig(1);
% =============== ПЕРВЫЙ ГРАФИК (слева) ===============
% Масштаб и размеры
u := 1.5cm;
% Сдвиг для размещения графиков рядом
@santhoshtr
santhoshtr / main.mp
Created February 13, 2026 10:04
Untitled Metapost Sample #metapost-sandbox
u := 1cm;
path curve;
curve := (0,-1.5u) .. controls (2u,-1.2u) and (4u,0) .. (5.5u,2.5u);
% РИСУНОК 1
beginfig(1);
drawarrow (-0.5u,0)--(6.5u,0);
label.bot("x", (6.5u,0));
@santhoshtr
santhoshtr / main.mp
Created February 13, 2026 10:04
Untitled Metapost Sample #metapost-sandbox
u := 1cm;
pickup pencircle scaled 0.6bp;
path fcurve;
fcurve := (0,-1.0u)
.. (1u,-0.6u)
.. (2u,-0.1u)
.. (3u,0.5u)
.. (4u,1.3u)
.. (5u,2.4u);
@santhoshtr
santhoshtr / main.mp
Created February 13, 2026 10:04
Untitled Metapost Sample #metapost-sandbox
beginfig(0);
width:=100;
rotation:=45;
pen calligraphicpen ;
calligraphicpen := makepen ((0, 0)--(width,0 ) rotated rotation) ;
z0 = (x1+150, 0);
z1 = (0, y0+250);
@santhoshtr
santhoshtr / main.mp
Created February 13, 2026 10:04
Parabola #metapost-sandbox
beginfig(0);
width:=100;
rotation:=45;
pen calligraphicpen ;
calligraphicpen := makepen ((0, 0)--(width,0 ) rotated rotation) ;
z0 = (x1+150, 0);
z1 = (0, y0+250);
@santhoshtr
santhoshtr / main.mp
Created February 13, 2026 10:04
Diwali #metapost-sandbox
beginfig(0);
width:=100;
rotation:=-40;
pen calligraphypen;
calligraphypen := makepen((0,0)--(width,0) rotated rotation);
z0 = (300, 500);
z1 = (x0, y0-150);
@santhoshtr
santhoshtr / main.mp
Created February 13, 2026 10:04
Untitled Metapost Sample #metapost-sandbox
beginfig(0);
width:=100;
rotation:=45;
pen calligraphicpen ;
calligraphicpen := makepen ((0, 0)--(width,0 ) rotated rotation) ;
z0 = (x1+150, 0);
z1 = (0, y0+250);