ScrapRunのテストページ
code:puml
@startgantt
hide footbox
Project starts 2021-11-30
12月上旬 starts 2021-12-01 and ends 2021-12-10 12月中旬 starts 2021-12-11 and ends 2021-12-20 11月下旬 starts 2021-12-21 and ends 2021-12-31 -- 行事 --
クリスマス starts 2021-12-24 and ends 2021-12-25 @endgantt
code:test.puml
@startuml
Bob -> Alice: Hello
@enduml
code:glsl
precision mediump float;
uniform float u_time;
uniform vec2 u_mouse;
uniform vec2 u_resolution;
float circle(float r, float radius, float stroke_width) {
return (abs(r - radius) <= stroke_width) ? 1. : 0.;
}
float line(vec2 p, float y, float stroke_width){
return abs(p.y - y) <= stroke_width ? 1. : 0.;
}
vec2 rotate(vec2 v, float th) {
return vec2(cos(th) * v.x - sin(th) * v.y, sin(th) * v.x + cos(th) * v.y);
}
float hexagram(vec2 p, vec2 center, float radius, float stroke_width) {
float r = length(p - center);
float f_inside = 1. - step(radius, r);
float f_circle = circle(r, radius, stroke_width * 2.);
float f_lines = 0.;
for(int i = 0; i <3; i++){
f_lines += line(rotate(p, 2. * 3.1415 / 3. * float(i)), radius / 2., stroke_width);
}
for(int i = 0; i <3; i++){
f_lines += line(rotate(p, 2. * 3.1415 / 3. * (float(i) + .5)), radius / 2., stroke_width);
}
float addition = f_lines + f_circle;
float multiplication = addition * f_inside;
return multiplication;
}
void main() {
vec2 from_center_x2 = (gl_FragCoord.xy * 2. - u_resolution);
vec2 p = from_center_x2 / min(u_resolution.y, u_resolution.x);
//vec2 p = rotate(p_, time);
float addition = 0.;
float radius = .8;
float stroke_width = 0.01;
for(int i = 0; i <10; i++){
addition += hexagram(rotate(p, .5 * u_time * float(i + 1)), vec2(0., 0.), radius, stroke_width);
radius /= 2.;
stroke_width /= 2.;
}
float multiplication = addition * 1.;
gl_FragColor=vec4(multiplication);
}
code:sample.svg
faefre
fefeeafea
code:sample.svg
arearekjiji
新しい行
ああガ
code:test.svg
<svg xml="1.0">
<script>
scriptはrenderingされない?
文法ミスってるのかも
</script>
SVG を出力するテスト
</svg>
code:circle.svg
<circle cx="50" cy="50" r="50" fill="orange"/>
<text x="" y="50" font-size="1em" fill="red" font-weight="bold">君たちは</text>
<text x="" y="80" font-size="1em" fill="red" font-weight="bold">どう生きるか</text>
</svg>
code:square.svg
<g stroke-width="0.1">
<g fill="red">
<rect x="0" y="0" width="10" height="10"/>
<rect x="12" y="1" width="10" height="10"/>
</g>
<g stroke="lightgray" text-anchor="end" font-size="0.05em">
<line x1="1" y1="0" x2="1" y2="20"/>
<line x1="0" y1="1" x2="20" y2="1"/>
<text x="1" y="1" dx="-0.1" dy="-0.1">0</text>
</g>
<polygon points="0,0 0,20, 20,20, 20,0" stroke="#ccc" fill="none"/>
</g>
</svg>
code:tikz(tex)
\usepackage{circuitikz}
\usepackage{amsfonts}
\begin{document}
\draw (0,0)
\draw (2,3) -- (4,3)
\end{circuitikz}
\end{document}
code:graph.tikz(tex)
\usetikzlibrary{angles}
\usetikzlibrary{quotes}
\begin{document}
%\clip (0,0) rectangle (5,5);% 切り抜き
\coordinate (O) at (0,0);
\coordinate (A) at (1,2);
\coordinate (O) at (3/4,3/2);
\coordinate (B) at (2,3/2);
\coordinate (C) at (2,2/3);
code:graph.tikz(tex)
\end{tikzpicture}
\end{document}