--- title: "Garland" id: 72292 type: "computer_media" slug: "garland" url: "http://localhost/computer_media/garland/" markdown_url: "http://localhost/computer_media/garland.md" published_at: "2026-10-23T07:47:20+00:00" modified_at: "2026-10-23T07:47:20+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/10/garland-3.png" excerpt: "Draws a Christmas garland of two rings of petalled flowers from polar equations, using curved DRAW arcs in green on red." category: - name: "Archived Media" slug: "archived-media" taxonomy: "category" url: "http://localhost/category/archived-media/" 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: "Gertie Andersson" slug: "gertie-andersson" taxonomy: "indiv" url: "http://localhost/indiv/gertie-andersson/" genre: - name: "Graphics" slug: "graphics" taxonomy: "genre" url: "http://localhost/type/graphics/" media_contents: - id: 72439 title: "SINCUS Exchange Tape 104" type: "computer_media" url: "http://localhost/computer_media/sincus-exchange-tape-104/" media_type: "Program" programmers: - name: "Gertie Andersson" slug: "gertie-andersson" taxonomy: "indiv" url: "http://localhost/indiv/gertie-andersson/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Garland%20%281986%29%28Andersson%2C%20Gertie%29%28TS2068%29%28US%29%28Program%29.zip" tsrun_member: "Garland (1986)(Andersson, Gertie)(TS2068)(US)(Program)/Garland (1986)(Andersson, Gertie)(TS2068)(US)(Program).tap" mediadate: "1986" images: - url: "http://localhost/wp-content/uploads/2026/10/garland-3.png" article_media: - id: 66326 title: "Garland" type: "article" url: "http://localhost/article/garland/" media_type_tags: "Graphics" license: false --- # Garland Draws a Christmas garland: two concentric rings of flowers in green ink on a red screen. Each flower is a set of seven curved petals, drawn as pairs of arcs out from and back to a point on the ring, and the second ring is larger and holds more flowers than the first. The size of the ring, the number of flowers and petals, the petal length and the curve of each petal are all set in plainly labelled variables at lines 110–240, so you can edit them to make other designs; the REMs advise using prime or odd numbers for the flower and petal counts. REMs credit Gertie Andersson, October 1986, with thanks to Oleg D. Jefimenko, whose equations appeared in *Timelinez* 4/86. The program was published as “Garland” in *Timelinez* in April 1987. ## Program Analysis - Lines 110–140: centre 128,87, radius 56 and 15 flowers. Lines 210–240: flower shape `C=360`, `A=180`, petal length 16 by 16, curve `P=.375*PI` and 7 petals. - Lines 405–480: for each of two rings, step `T` round the circle and plot a point, then draw the petals with `DRAW H/.82,V,P: DRAW -H/.82,-V,P`. - Line 500: the second ring gets radius +15 and 9 more flowers. ## Notable Techniques - The third parameter of `DRAW` turns each petal into an arc of `P` radians, and drawing out and back with the same angle makes the two sides of the petal bulge apart. - Horizontal distances are divided by 0.82 to correct for the screen’s pixel aspect, so the ring comes out round rather than flattened. - A REM notes that there are 546 pixels in a circle of any size, and the ring step `546/F` is built on that figure. ## Potential Issues - Large radius or petal settings run the drawing off the screen and stop with an out-of-screen error. - The drawing takes several minutes in BASIC, and the program simply stops when it is finished. This program came from an Oliger (JLO SAFE) disk and was converted to load from tape. It needed no changes and was tested in ZEsarUX. ## Source Code ``` 10 REM ..GARLAND ..LOAD "GARLAND" 15 REM ..WITH THANKS TO OLEG ..D. JEFIMENKO, ..TIMELINEZ 4/86 ..PAGE 200 20 REM ..BY GERTIE ANDERSSON ..10/86 25 REM ..THERE ARE 546 PIXELS ..IN A REUE CIRCLE OF ..ANY SIZE 30 REM ..PRIME OF ODD NUMBERS ..BEST FOR F AND N 50 REM ..FOR CHRISTMAS COLORS 55 BORDER 2: PAPER 2: INK 4: CLS 100 REM ..CIRCLE VARIABLES 110 LET X=128: REM H CENTER 120 LET Y=87: REM V CENTER 130 LET R=56: REM RADIUS 140 LET F=15: REM NUMBER OF FLOWERS WANTED 200 REM ..FLOWER VARIABLES 210 LET C=360: LET A=180: REM SHAPE OF FLOWER 220 LET HH=16: LET VV=16: REM LENGTH OF PETALS 230 LET P=.375*PI: REM CURVE OF PETALS 240 LET N=7: REM NUMBER OF PETALS 400 REM ..GARLAND 405 FOR K=1 TO 2: REM NUMBER OF CIRCLES 410 LET S=546/F: REM STEP FOR CIRCLES 415 LET SS=C/N: REM STEP FOR FLOWERS 420 FOR T=0 TO 2*PI STEP S/87 430 PLOT X+R*COS T/.82,Y+R*SIN T 440 FOR I=0 TO C STEP SS 450 LET H=HH*SIN (I*PI/A) 460 LET V=VV*COS (I*PI/A) 470 DRAW H/.82,V,P: DRAW -H/.82,-V,P 480 NEXT I: NEXT T 500 LET R=R+15: LET F=F+9 550 NEXT K ```