> <\body> <\hide-preamble> \; >>> >> ]||.tm>>>> |>>> <\itemize> \<#53F6\>\<#7530\>\<#946B\>\<#FF1A\>\<#4EE3\>\<#7801\>\<#7F3A\>\<#5C11\>\<#6CE8\>\<#91CA\> \<#5F20\>\<#4F73\>\<#FF1A\>\<#9ED8\>\<#8BA4\>\<#5FEB\>\<#6377\>\<#952E\>\<#7ED1\>\<#5B9A\>\<#5230\>\<#5BF9\>\<#5E94\>\<#5E73\>\<#53F0\> 1.2.0 \<#7CD6\>\<#8C46\>\<#513F\>\<#FF1A\>line break graphics in Scheme> <\itemize> <\session|scheme|default> <\unfolded-io|Scheme] > (define (plot l) (stree-\tree l)) <|unfolded-io> plot <\unfolded-io|Scheme] > (plot '(frac 1 2)) <|unfolded-io> > <\unfolded-io|Scheme] > (define (point x y) \ \ `(point ,(number-\string x) ,(number-\string y))) <|unfolded-io> point <\unfolded-io|Scheme] > (point 1 1) <|unfolded-io> (point "1" "1") <\unfolded-io|Scheme] > (plot `(point "1" "1")) <|unfolded-io> > <\unfolded-io|Scheme] > (plot (point 1 1)) <|unfolded-io> > <\unfolded-io|Scheme] > (define (point.x point) \ \ (string-\number (list-ref point 1))) <|unfolded-io> point.x <\unfolded-io|Scheme] > (define (point.y point) \ \ (string-\number (list-ref point 2))) <|unfolded-io> point.y <\unfolded-io|Scheme] > (point.y (point 1 2)) <|unfolded-io> 2 <\unfolded-io|Scheme] > (define (line . points) \ \ (cond ((nlist? points) `()) \ \ \ \ \ \ \ \ ((== points '()) `()) \ \ \ \ \ \ \ \ (else `(line ,@points)))) <|unfolded-io> line <\unfolded-io|Scheme] > (plot (line (point 0 0) (point 1 1))) <|unfolded-io> |>> <\unfolded-io|Scheme] > (define (rectangle leftdown rightup) \ \ (let ((leftup (point (point.x leftdown) (point.y rightup))) \ \ \ \ \ \ \ \ (rightdown (point (point.x rightup) (point.y leftdown)))) \ \ \ \ `(cline ,leftdown ,leftup ,rightup ,rightdown))) <|unfolded-io> rectangle <\unfolded-io|Scheme] > (define (circle center radius) \ \ (let ((p1 (point (- (point.x center) radius) (point.y center))) \ \ \ \ \ \ \ \ (p2 (point (point.x center) (+ (point.y center) radius))) \ \ \ \ \ \ \ \ (p3 (point (+ (point.x center) radius) (point.y center)))) \ \ \ \ `(carc ,p1 ,p2 ,p3))) <|unfolded-io> circle <\unfolded-io|Scheme] > (plot (circle (point 0 0) 1)) <|unfolded-io> ||>> <\unfolded-io|Scheme] > (circle (point 0 0) 1) <|unfolded-io> (carc (point "-1" "0") (point "0" "1") (point "1" "0")) <\input|Scheme] > \; <\script-input|scheme|default> (begin \ \ (define (plot g) (stree-\tree g)) \ \ (plot '(frac 1 2))) >> ||> <\script-input|scheme|default> (begin \ \ (define (plot g) (stree-\tree g)) \ \ \ \ (define (point x y) \ \ \ \ `(point ,(number-\string x) ,(number-\string y))) \ \ (define (point.x point) \ \ \ \ (string-\number (list-ref point 1))) \ \ (define (point.y point) \ \ \ \ (string-\number (list-ref point 2))) \ \ \ \ (define (circle center radius) \ \ \ \ (let ((p1 (point (- (point.x center) radius) (point.y center))) \ \ \ \ \ \ \ \ (p2 (point (point.x center) (+ (point.y center) radius))) \ \ \ \ \ \ \ \ (p3 (point (+ (point.x center) radius) (point.y center)))) \ \ \ \ \ \ `(graphics (carc ,p1 ,p2 ,p3)))) \ \ \ \ (plot (circle (point 0 0) 1))) |gr-arrow-end|\|||>||>|||>>>>>> \; <\itemize> Eukleides syntax to stree Use ChatGPT to generate the Eukleides syntax\ \; \; <\initial> <\collection> <\references> <\collection> > > > > > <\auxiliary> <\collection> <\associate|toc> |math-font-series||1Welcome> |.>>>>|> |math-font-series||2Topic: Scheme and Plotting> |.>>>>|> |2.1T|E>||||0.5fn>|0fn|-0.1fn>>XACS||||0.5fn>|0fn|-0.1fn>> graphics in Scheme |.>>>>|> > |2.2Foldable Scheme Session |.>>>>|> > |math-font-series||3Discussion> |.>>>>|>