Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cjquines/tsqx
Asymptote preprocessor
https://github.com/cjquines/tsqx
Last synced: about 1 month ago
JSON representation
Asymptote preprocessor
- Host: GitHub
- URL: https://github.com/cjquines/tsqx
- Owner: cjquines
- Created: 2016-05-21T12:51:35.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-11-09T05:25:22.000Z (about 2 years ago)
- Last Synced: 2024-05-23T04:36:40.592Z (6 months ago)
- Language: Python
- Homepage:
- Size: 45.9 KB
- Stars: 10
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TSQX
[Asymptote](https://www.artofproblemsolving.com/wiki/index.php/Asymptote_(Vector_Graphics_Language)) preprocessor, based on [TSQ](https://github.com/vEnhance/dotfiles/blob/main/py-scripts/tsq.py).
Run `python3 tsqx.py filename.txt > filename.asy`. See [wiki](https://github.com/cjquines/tsqx/wiki/Documentation) for more info.
Sample code:
```
~triangle A B C
D ;= foot A B C
E := midpoint A--B
F' N = (rotate -30 E)(extension A (foot A B C) C E)circumcircle A B C / 0.2 lightgray /
A--B--C--cycle
A--D
B--F' / dashed blue
```Generated code:
```
pair A = dir(110);
pair B = dir(210);
pair C = dir(330);
pair D = foot(A, B, C);
pair E = midpoint(A--B);
pair F_prime = rotate(-30, E)*extension(A, foot(A, B, C), C, E);filldraw(circumcircle(A, B, C), opacity(0.2)+lightgray, defaultpen);
draw(A--B--C--cycle);
draw(A--D);
draw(B--F_prime, dashed+blue);dot("$A$", A, dir(A));
dot("$B$", B, dir(B));
dot("$C$", C, dir(C));
label("$D$", D, dir(D));
dot("$F'$", F_prime, plain.N);
```Which makes the diagram:
![Diagram](sample.png)