外部変形は データのやり取りをテキストファイルで行うので プログラム言語は 自由に選ぶことができます。図形は機能的かつシンプルなため、数多くのユーザーに受け入れられています。
:clispで放射線を引く(ray)
@echo off
for /f "delims=:" %%n in ('findstr /n "^#!" %0') do (
more +%%n %0 | clisp -q > nul
)
goto:eof
REM #jww
REM #0 基準点を指示して下さい
REM #e
#!この次の行からプログラムを書いてください
( ;jwc_temp.txt から 入力
with-open-file (f "jwc_temp.txt" :direction :input)
(loop for line = (read-line f nil) while line do
(setq a (regexp:regexp-split "\\s\\+" line))
(if (regexp:match "^hk" line) (setq hk (cadr a)))
)
)
( ;準備計算
progn
(setq hk (read-from-string hk))
(setq x (* (cos (* hk (/ pi 180))) 1d+10))
(setq y (* (sin (* hk (/ pi 180))) 1d+10))
)
( ;jwc_temp.txt へ 出力
with-open-file (f "jwc_temp.txt" :direction :output)
(format f "0 0 ~g ~g~%" x y)
)