From 6319e6cf35ec94fde9818a4acdfad1b621df1d8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E6=B5=AA=E7=86=8A=E7=8C=AB=E5=84=BF?= Date: Sun, 11 Jun 2023 13:37:16 +0000 Subject: [PATCH] !39 X202309 --- XmacsLabs/X202309.tm | 248 +++++++++++++++++++++++++++++++++++++------ XmacsLabs/index.tm | 6 +- 2 files changed, 221 insertions(+), 33 deletions(-) diff --git a/XmacsLabs/X202309.tm b/XmacsLabs/X202309.tm index fc1bfcc..7e99845 100644 --- a/XmacsLabs/X202309.tm +++ b/XmacsLabs/X202309.tm @@ -1,6 +1,6 @@ -> +> <\body> <\hide-preamble> @@ -17,35 +17,235 @@ - 20:30~20:45 + <\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 + - 20:45~21:15 + 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|\|||>||>|||>>>>>> + + \; - Before 21:30 \<#6B22\>\<#8FCE\>\<#5927\>\<#5BB6\>\<#4E00\>\<#952E\>\<#4E09\>\<#8FDE\> + <\itemize> + Eukleides syntax to stree + + Use ChatGPT to generate the Eukleides syntax\ + + + \; + + \; <\initial> <\collection> - + <\references> <\collection> - > - > - > - > - > - > - > - > + > + > + > + > + > @@ -57,32 +257,20 @@ |math-font-series||2Topic: - Unicode support> |.>>>>|> + Scheme and Plotting> |.>>>>|> - |2.1tmu format - |.>>>>|> + |2.1T|E>||||0.5fn>|0fn|-0.1fn>>XACS||||0.5fn>|0fn|-0.1fn>> + graphics in Scheme |.>>>>|> > - |2.2Unicode char table + |2.2Foldable Scheme Session |.>>>>|> > - |2.3Inner implemention of - unicode string |.>>>>|> - > - - |2.4Unicode handling at user - interface |.>>>>|> - > - - |2.5texmacs programming language - |.>>>>|> - > - |math-font-series||3Discussion> |.>>>>|> - + \ No newline at end of file diff --git a/XmacsLabs/index.tm b/XmacsLabs/index.tm index 950722d..6de2e0c 100644 --- a/XmacsLabs/index.tm +++ b/XmacsLabs/index.tm @@ -35,11 +35,11 @@ \<#5386\>> - ||||||||||||||||||||||||||||||||||||||||||||||||||||||||\<#516D\>\<#6708\>>|||||||\<#4E03\>\<#6708\>>||||||>|\<#65E5\>>|\<#4E00\>>|\<#4E8C\>>|\<#4E09\>>|\<#56DB\>>|\<#4E94\>>|\<#516D\>>|\<#65E5\>>|\<#4E00\>>|\<#4E8C\>>|\<#4E09\>>|\<#56DB\>>|\<#4E94\>>|\<#516D\>>>||||||||||||||>||||||||||||||>|\<#4E5D\>\<#6B21\>\<#7814\>\<#8BA8\>\<#4F1A\>>>|||||||||||||>||||||||||||||>|\<#5341\>\<#6B21\>\<#7814\>\<#8BA8\>\<#4F1A\>>>|||||||||||||>||||||||||||||>>>> + green>||\<#516D\>\<#6708\>>|||||||\<#4E03\>\<#6708\>>||||||>|\<#65E5\>>|\<#4E00\>>|\<#4E8C\>>|\<#4E09\>>|\<#56DB\>>|\<#4E94\>>|\<#516D\>>|\<#65E5\>>|\<#4E00\>>|\<#4E8C\>>|\<#4E09\>>|\<#56DB\>>|\<#4E94\>>|\<#516D\>>>||||||||||||||>||||||||||||||>|\<#4E5D\>\<#6B21\>\<#7814\>\<#8BA8\>\<#4F1A\>>>|||||||||||||>||||||||||||||>|\<#5341\>\<#6B21\>\<#7814\>\<#8BA8\>\<#4F1A\>>>|||||||||||||>||||||||||||||>>>> ||||||||||||||||||||||||||||