--- title: "Line Draw" id: 79560 type: "computer_media" slug: "line-draw" url: "http://localhost/computer_media/line-draw/" markdown_url: "http://localhost/computer_media/line-draw.md" published_at: "2026-11-22T19:36:03+00:00" modified_at: "2026-11-22T19:36:03+00:00" featured_image: url: "http://localhost/wp-content/uploads/2026/11/line-draw-1.png" excerpt: "Two TS2068 routines that draw string-art ellipses and nested, rotated polygons." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "Patrick Fagan" slug: "patrick-fagan" taxonomy: "indiv" url: "http://localhost/indiv/patrick-fagan/" genre: - name: "Graphics" slug: "graphics" taxonomy: "genre" url: "http://localhost/type/graphics/" media_type: "Program" programmers: - name: "Patrick Fagan" slug: "patrick-fagan" taxonomy: "indiv" url: "http://localhost/indiv/patrick-fagan/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Line%20Draw%20%281985%29%28Fagan%2C%20Patrick%29%28TS2068%29%28Program%29.zip" tsrun_member: "Line Draw (1985)(Fagan, Patrick)(TS2068)(Program)/Line Draw (1985)(Fagan, Patrick)(TS2068)(Program).tap" mediadate: "1985" images: - url: "http://localhost/wp-content/uploads/2026/11/line-draw-1.png" - url: "http://localhost/wp-content/uploads/2026/11/line-draw-2.png" article_media: - id: 78372 title: "Line Draw" type: "article" url: "http://localhost/article/line-draw/" media_type_tags: "Graphics" license: false --- # Line Draw Two line-drawing routines for the TS2068. The first joins every point on an ellipse to every other, five times over, with a random 8 to 13 points and the width and height you give each time. The second draws nested, rotated polygons from the number of sides and copies, the size and the rotation you give, three times over. RUN starts the first routine. GO TO 1650 starts the second. Rotation is in radians. Lines 1678 and 1685 read B for the rotation, as in the printed listing. Published in LISTing May – June 1985 ([Line Draw](https://timexsinclair.com/article/line-draw/)). ## Source Code ``` 1230 REM DRAWN LINES FROM POINT ON CIRCUMFERENCE TO OTHER POINTS ON CIRCUMFERENCE 1235 LET C=0 1240 DIM X(20): DIM Y(20) 1245 LET C=C+1 1250 LET N=INT (RND*6)+8 1255 LET P=2*PI/N 1257 INPUT "DISTANCE X''DISTANCE Y FROM CENTER CO-ORD";E;" ";F 1260 FOR I=1 TO N 1265 LET Z=P*I 1270 LET X(I)=INT (COS Z*E+127) 1275 LET Y(I)=INT (SIN Z*F+85) 1280 NEXT I 1285 FOR I=1 TO N 1290 PLOT X(I),Y(I) 1295 NEXT I 1297 INK 9 1300 FOR w=n TO 1 STEP -1 1305 FOR i=1 TO n 1310 PLOT x(w),y(w) 1315 DRAW INT x(i)-x(w),INT y(i)-y(w) 1320 NEXT i: NEXT w 1325 IF C=5 THEN STOP 1330 GO TO 1240 1650 REM DRAW MULTI SIDED FIGURES 1655 LET A=0 1660 DIM x(30): DIM y(30) 1665 INPUT "# OF POLYGON SIDES ";SD 1670 INPUT "# OF POLYGONS?";SI 1675 LET tp=2*PI: LET g=0: LET SP=tp/sd: LET q=127: LET r=87 1677 INPUT "DISTANCE X''DISTANCE Y FROM CENTER CO-ORD";E;" ";F 1678 INPUT "AMOUNT OF ROTATION? ";B 1680 FOR t=0 TO SI-1 1685 LET g=B 1695 FOR n=1 TO sd 1700 LET z=sp*n+g 1705 LET x(n)=INT (SIN z*E+q) 1710 LET y(n)= INT (COS z*F+r) 1715 NEXT n 1720 LET n=sd-1 1725 FOR s=sd TO 1 STEP -1 1730 PLOT x(n),y(n): DRAW x(s)-x(n),y(s)-y(n) 1735 LET n=n-1 1740 IF n=0 THEN LET n=sd 1745 NEXT s: LET q=q-3: LET r=r-3: NEXT t: LET A=A+1 1755 IF A=3 THEN STOP 1760 GO TO 1660 ```