1
0
Fork 0
This commit is contained in:
沈浪熊猫儿 2023-06-11 13:37:16 +00:00
parent 7b90fbf832
commit 6319e6cf35
2 changed files with 221 additions and 33 deletions

View File

@ -1,6 +1,6 @@
<TeXmacs|2.1.2>
<style|<tuple|seminar|comment>>
<style|<tuple|seminar|comment|chinese>>
<\body>
<\hide-preamble>
@ -17,35 +17,235 @@
<section|Welcome>
20:30~20:45
<\itemize>
<item>\<#53F6\>\<#7530\>\<#946B\>\<#FF1A\>\<#4EE3\>\<#7801\>\<#7F3A\>\<#5C11\>\<#6CE8\>\<#91CA\>
<item>\<#5F20\>\<#4F73\>\<#FF1A\>\<#9ED8\>\<#8BA4\>\<#5FEB\>\<#6377\>\<#952E\>\<#7ED1\>\<#5B9A\>\<#5230\>\<#5BF9\>\<#5E94\>\<#5E73\>\<#53F0\>
1.2.0
<item>\<#7CD6\>\<#8C46\>\<#513F\>\<#FF1A\>line break
</itemize>
<section|Topic: Scheme and Plotting>
20:45~21:15
<subsection|<TeXmacs> graphics in Scheme>
<\itemize>
<item><hlink|Modular graphics with Scheme|https://texmacs.github.io/notes/docs/modular-scheme-graphics.html>
<item><hlink|Composing TeXmacs graphics with
Scheme|https://texmacs.github.io/notes/docs/scheme-graphics.html>
<item><hlink|Embedding graphics composed with Scheme into
documents|https://texmacs.github.io/notes/docs/scheme-graphics-embedding.html>
</itemize>
<\session|scheme|default>
<\unfolded-io|Scheme] >
(define (plot l) (stree-\<gtr\>tree l))
<|unfolded-io>
plot
</unfolded-io>
<\unfolded-io|Scheme] >
(plot '(frac 1 2))
<|unfolded-io>
<text|<frac|1|2>>
</unfolded-io>
<\unfolded-io|Scheme] >
(define (point x y)
\ \ `(point ,(number-\<gtr\>string x) ,(number-\<gtr\>string y)))
<|unfolded-io>
point
</unfolded-io>
<\unfolded-io|Scheme] >
(point 1 1)
<|unfolded-io>
(point "1" "1")
</unfolded-io>
<\unfolded-io|Scheme] >
(plot `(point "1" "1"))
<|unfolded-io>
<text|<point|1|1>>
</unfolded-io>
<\unfolded-io|Scheme] >
(plot (point 1 1))
<|unfolded-io>
<text|<point|1|1>>
</unfolded-io>
<\unfolded-io|Scheme] >
(define (point.x point)
\ \ (string-\<gtr\>number (list-ref point 1)))
<|unfolded-io>
point.x
</unfolded-io>
<\unfolded-io|Scheme] >
(define (point.y point)
\ \ (string-\<gtr\>number (list-ref point 2)))
<|unfolded-io>
point.y
</unfolded-io>
<\unfolded-io|Scheme] >
(point.y (point 1 2))
<|unfolded-io>
2
</unfolded-io>
<\unfolded-io|Scheme] >
(define (line . points)
\ \ (cond ((nlist? points) `())
\ \ \ \ \ \ \ \ ((== points '()) `())
\ \ \ \ \ \ \ \ (else `(line ,@points))))
<|unfolded-io>
line
</unfolded-io>
<\unfolded-io|Scheme] >
(plot (line (point 0 0) (point 1 1)))
<|unfolded-io>
<text|<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>
<\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>
<\unfolded-io|Scheme] >
(plot (circle (point 0 0) 1))
<|unfolded-io>
<text|<carc|<point|-1|0>|<point|0|1>|<point|1|0>>>
</unfolded-io>
<\unfolded-io|Scheme] >
(circle (point 0 0) 1)
<|unfolded-io>
(carc (point "-1" "0") (point "0" "1") (point "1" "0"))
</unfolded-io>
<\input|Scheme] >
\;
</input>
</session>
<subsection|Foldable Scheme Session>
<tree|frac|1|2>
<\script-input|scheme|default>
(begin
\ \ (define (plot g) (stree-\<gtr\>tree g))
\ \ (plot '(frac 1 2)))
</script-input|<text|<frac|1|2>>>
<tree|carc|<tree|point|-1|0>|<tree|point|0|1>|<tree|point|1|0>>
<\script-input|scheme|default>
(begin
\ \ (define (plot g) (stree-\<gtr\>tree g))
\ \
\ \ (define (point x y)
\ \ \ \ `(point ,(number-\<gtr\>string x) ,(number-\<gtr\>string y)))
\ \ (define (point.x point)
\ \ \ \ (string-\<gtr\>number (list-ref point 1)))
\ \ (define (point.y point)
\ \ \ \ (string-\<gtr\>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)))
</script-input|<text|<with|gr-mode|<tuple|group-edit|edit-props>|gr-arrow-end|\<gtr\>|<graphics|<carc|<point|-1|0>|<point|0|1>|<point|1|0>>|<line|<point|-6.1543|0.753175>|<point|-2.699877629316047|2.0231842836354015>>|<with|arrow-end|\<gtr\>|<line|<point|-5.15523|-0.144298>|<point|-2.3273415795740178|1.0071768752480488>>>>>>>
\;
<section|Discussion>
Before 21:30 \<#6B22\>\<#8FCE\>\<#5927\>\<#5BB6\>\<#4E00\>\<#952E\>\<#4E09\>\<#8FDE\>
<\itemize>
<item>Eukleides syntax to stree
<item>Use ChatGPT to generate the Eukleides syntax\
</itemize>
\;
\;
</body>
<\initial>
<\collection>
<associate|info-flag|detailed>
<associate|page-medium|paper>
<associate|page-medium|papyrus>
<associate|preamble|false>
</collection>
</initial>
<\references>
<\collection>
<associate|auto-1|<tuple|1|2|http://git.tmml.wiki/XmacsLabs/planet/raw/main/XmacsLabs/X202307.tm>>
<associate|auto-2|<tuple|2|2|http://git.tmml.wiki/XmacsLabs/planet/raw/main/XmacsLabs/X202307.tm>>
<associate|auto-3|<tuple|3|2|http://git.tmml.wiki/XmacsLabs/planet/raw/main/XmacsLabs/X202307.tm>>
<associate|auto-4|<tuple|3|3|http://git.tmml.wiki/XmacsLabs/planet/raw/main/XmacsLabs/X202307.tm>>
<associate|auto-5|<tuple|2.3|3|http://git.tmml.wiki/XmacsLabs/planet/raw/main/XmacsLabs/X202307.tm>>
<associate|auto-6|<tuple|3|4|http://git.tmml.wiki/XmacsLabs/planet/raw/main/XmacsLabs/X202307.tm>>
<associate|auto-7|<tuple|3|4|http://git.tmml.wiki/XmacsLabs/planet/raw/main/XmacsLabs/X202307.tm>>
<associate|auto-8|<tuple|3|6|http://git.tmml.wiki/XmacsLabs/planet/raw/main/XmacsLabs/X202307.tm>>
<associate|auto-1|<tuple|1|2>>
<associate|auto-2|<tuple|2|2>>
<associate|auto-3|<tuple|2.1|2>>
<associate|auto-4|<tuple|2.2|2>>
<associate|auto-5|<tuple|3|?>>
</collection>
</references>
@ -57,32 +257,20 @@
<no-break><pageref|auto-1><vspace|0.5fn>
<vspace*|1fn><with|font-series|<quote|bold>|math-font-series|<quote|bold>|2<space|2spc>Topic:
Unicode support> <datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
Scheme and Plotting> <datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-2><vspace|0.5fn>
<with|par-left|<quote|1tab>|2.1<space|2spc>tmu format
<datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<with|par-left|<quote|1tab>|2.1<space|2spc>T<rsub|<space|-0.4spc><move|<resize|<with|math-level|<quote|0>|E>||||0.5fn>|0fn|-0.1fn>><space|-0.4spc>X<rsub|<space|-0.4spc><move|<resize|M<space|-0.2spc>A<space|-0.4spc>CS||||0.5fn>|0fn|-0.1fn>>
graphics in Scheme <datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-3>>
<with|par-left|<quote|1tab>|2.2<space|2spc>Unicode char table
<with|par-left|<quote|1tab>|2.2<space|2spc>Foldable Scheme Session
<datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-4>>
<with|par-left|<quote|1tab>|2.3<space|2spc>Inner implemention of
unicode string <datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-5>>
<with|par-left|<quote|1tab>|2.4<space|2spc>Unicode handling at user
interface <datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-6>>
<with|par-left|<quote|1tab>|2.5<space|2spc>texmacs programming language
<datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-7>>
<vspace*|1fn><with|font-series|<quote|bold>|math-font-series|<quote|bold>|3<space|2spc>Discussion>
<datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-8><vspace|0.5fn>
<no-break><pageref|auto-5><vspace|0.5fn>
</associate>
</collection>
</auxiliary>

View File

@ -35,11 +35,11 @@
<section*|\<#65E5\>\<#5386\>>
<tabular|<tformat|<cwith|1|9|1|14|cell-halign|c>|<cwith|1|9|1|14|cell-valign|c>|<cwith|1|9|7|7|cell-lborder|0ln>|<cwith|1|9|6|6|cell-rborder|0ln>|<cwith|1|9|7|7|cell-rborder|1ln>|<cwith|1|9|8|8|cell-lborder|1ln>|<cwith|1|1|1|1|cell-row-span|1>|<cwith|1|1|1|1|cell-col-span|7>|<cwith|1|1|8|8|cell-row-span|1>|<cwith|1|1|8|8|cell-col-span|7>|<cwith|2|2|1|7|cell-halign|c>|<cwith|2|2|1|7|cell-valign|c>|<cwith|2|2|7|7|cell-tborder|0ln>|<cwith|2|2|7|7|cell-lborder|0ln>|<cwith|2|2|6|6|cell-rborder|0ln>|<cwith|2|2|7|7|cell-rborder|1ln>|<cwith|2|2|8|14|cell-halign|c>|<cwith|2|2|8|14|cell-valign|c>|<cwith|2|2|14|14|cell-tborder|0ln>|<cwith|1|1|8|14|cell-bborder|0ln>|<cwith|2|2|14|14|cell-bborder|0ln>|<cwith|2|2|14|14|cell-lborder|0ln>|<cwith|2|2|13|13|cell-rborder|0ln>|<cwith|2|2|14|14|cell-rborder|0ln>|<twith|table-width|1par>|<twith|table-hmode|exact>|<cwith|5|5|1|1|cell-background|pastel
green>|<cwith|7|7|1|1|cell-background|pastel
<tabular|<tformat|<cwith|1|9|1|14|cell-halign|c>|<cwith|1|9|1|14|cell-valign|c>|<cwith|1|9|7|7|cell-lborder|0ln>|<cwith|1|9|6|6|cell-rborder|0ln>|<cwith|1|9|7|7|cell-rborder|1ln>|<cwith|1|9|8|8|cell-lborder|1ln>|<cwith|1|1|1|1|cell-row-span|1>|<cwith|1|1|1|1|cell-col-span|7>|<cwith|1|1|8|8|cell-row-span|1>|<cwith|1|1|8|8|cell-col-span|7>|<cwith|2|2|1|7|cell-halign|c>|<cwith|2|2|1|7|cell-valign|c>|<cwith|2|2|7|7|cell-tborder|0ln>|<cwith|2|2|7|7|cell-lborder|0ln>|<cwith|2|2|6|6|cell-rborder|0ln>|<cwith|2|2|7|7|cell-rborder|1ln>|<cwith|2|2|8|14|cell-halign|c>|<cwith|2|2|8|14|cell-valign|c>|<cwith|2|2|14|14|cell-tborder|0ln>|<cwith|1|1|8|14|cell-bborder|0ln>|<cwith|2|2|14|14|cell-bborder|0ln>|<cwith|2|2|14|14|cell-lborder|0ln>|<cwith|2|2|13|13|cell-rborder|0ln>|<cwith|2|2|14|14|cell-rborder|0ln>|<twith|table-width|1par>|<twith|table-hmode|exact>|<cwith|7|7|1|1|cell-background|pastel
green>|<cwith|5|5|8|8|cell-background|pastel
green>|<cwith|7|7|8|8|cell-background|pastel
green>|<table|<row|<cell|2023\<#5E74\>\<#516D\>\<#6708\>>|<cell|>|<cell|>|<cell|>|<cell|>|<cell|>|<cell|>|<cell|2023\<#5E74\>\<#4E03\>\<#6708\>>|<cell|>|<cell|>|<cell|>|<cell|>|<cell|>|<cell|>>|<row|<cell|\<#5468\>\<#65E5\>>|<cell|\<#5468\>\<#4E00\>>|<cell|\<#5468\>\<#4E8C\>>|<cell|\<#5468\>\<#4E09\>>|<cell|\<#5468\>\<#56DB\>>|<cell|\<#5468\>\<#4E94\>>|<cell|\<#5468\>\<#516D\>>|<cell|\<#5468\>\<#65E5\>>|<cell|\<#5468\>\<#4E00\>>|<cell|\<#5468\>\<#4E8C\>>|<cell|\<#5468\>\<#4E09\>>|<cell|\<#5468\>\<#56DB\>>|<cell|\<#5468\>\<#4E94\>>|<cell|\<#5468\>\<#516D\>>>|<row|<cell|>|<cell|>|<cell|>|<cell|>|<cell|1>|<cell|2>|<cell|3>|<cell|>|<cell|>|<cell|>|<cell|>|<cell|>|<cell|>|<cell|1>>|<row|<cell|4>|<cell|5>|<cell|6>|<cell|7>|<cell|8>|<cell|9>|<cell|10>|<cell|2>|<cell|3>|<cell|4>|<cell|5>|<cell|6>|<cell|7>|<cell|8>>|<row|<cell|11<label|\<#7B2C\>\<#4E5D\>\<#6B21\>\<#7814\>\<#8BA8\>\<#4F1A\>>>|<cell|12>|<cell|13>|<cell|14>|<cell|15>|<cell|16>|<cell|17>|<cell|9>|<cell|10>|<cell|11>|<cell|12>|<cell|13>|<cell|14>|<cell|15>>|<row|<cell|18>|<cell|19>|<cell|20>|<cell|21>|<cell|22>|<cell|23>|<cell|24>|<cell|16>|<cell|17>|<cell|18>|<cell|19>|<cell|20>|<cell|21>|<cell|22>>|<row|<cell|25<label|\<#7B2C\>\<#5341\>\<#6B21\>\<#7814\>\<#8BA8\>\<#4F1A\>>>|<cell|26>|<cell|27>|<cell|28>|<cell|29>|<cell|30>|<cell|>|<cell|23>|<cell|24>|<cell|25>|<cell|26>|<cell|27>|<cell|28>|<cell|29>>|<row|<cell|>|<cell|>|<cell|>|<cell|>|<cell|>|<cell|>|<cell|>|<cell|30>|<cell|31>|<cell|>|<cell|>|<cell|>|<cell|>|<cell|>>>>>
green>|<cwith|5|5|1|1|cell-background|pastel
red>|<table|<row|<cell|2023\<#5E74\>\<#516D\>\<#6708\>>|<cell|>|<cell|>|<cell|>|<cell|>|<cell|>|<cell|>|<cell|2023\<#5E74\>\<#4E03\>\<#6708\>>|<cell|>|<cell|>|<cell|>|<cell|>|<cell|>|<cell|>>|<row|<cell|\<#5468\>\<#65E5\>>|<cell|\<#5468\>\<#4E00\>>|<cell|\<#5468\>\<#4E8C\>>|<cell|\<#5468\>\<#4E09\>>|<cell|\<#5468\>\<#56DB\>>|<cell|\<#5468\>\<#4E94\>>|<cell|\<#5468\>\<#516D\>>|<cell|\<#5468\>\<#65E5\>>|<cell|\<#5468\>\<#4E00\>>|<cell|\<#5468\>\<#4E8C\>>|<cell|\<#5468\>\<#4E09\>>|<cell|\<#5468\>\<#56DB\>>|<cell|\<#5468\>\<#4E94\>>|<cell|\<#5468\>\<#516D\>>>|<row|<cell|>|<cell|>|<cell|>|<cell|>|<cell|1>|<cell|2>|<cell|3>|<cell|>|<cell|>|<cell|>|<cell|>|<cell|>|<cell|>|<cell|1>>|<row|<cell|4>|<cell|5>|<cell|6>|<cell|7>|<cell|8>|<cell|9>|<cell|10>|<cell|2>|<cell|3>|<cell|4>|<cell|5>|<cell|6>|<cell|7>|<cell|8>>|<row|<cell|11<label|\<#7B2C\>\<#4E5D\>\<#6B21\>\<#7814\>\<#8BA8\>\<#4F1A\>>>|<cell|12>|<cell|13>|<cell|14>|<cell|15>|<cell|16>|<cell|17>|<cell|9>|<cell|10>|<cell|11>|<cell|12>|<cell|13>|<cell|14>|<cell|15>>|<row|<cell|18>|<cell|19>|<cell|20>|<cell|21>|<cell|22>|<cell|23>|<cell|24>|<cell|16>|<cell|17>|<cell|18>|<cell|19>|<cell|20>|<cell|21>|<cell|22>>|<row|<cell|25<label|\<#7B2C\>\<#5341\>\<#6B21\>\<#7814\>\<#8BA8\>\<#4F1A\>>>|<cell|26>|<cell|27>|<cell|28>|<cell|29>|<cell|30>|<cell|>|<cell|23>|<cell|24>|<cell|25>|<cell|26>|<cell|27>|<cell|28>|<cell|29>>|<row|<cell|>|<cell|>|<cell|>|<cell|>|<cell|>|<cell|>|<cell|>|<cell|30>|<cell|31>|<cell|>|<cell|>|<cell|>|<cell|>|<cell|>>>>>
<tabular|<tformat|<cwith|1|8|1|14|cell-halign|c>|<cwith|1|8|1|14|cell-valign|c>|<cwith|1|8|7|7|cell-lborder|0ln>|<cwith|1|8|6|6|cell-rborder|0ln>|<cwith|1|8|7|7|cell-rborder|1ln>|<cwith|1|8|8|8|cell-lborder|1ln>|<cwith|1|1|1|1|cell-row-span|1>|<cwith|1|1|1|1|cell-col-span|7>|<cwith|1|1|8|8|cell-row-span|1>|<cwith|1|1|8|8|cell-col-span|7>|<cwith|2|2|1|7|cell-halign|c>|<cwith|2|2|1|7|cell-valign|c>|<cwith|2|2|7|7|cell-tborder|0ln>|<cwith|2|2|7|7|cell-lborder|0ln>|<cwith|2|2|6|6|cell-rborder|0ln>|<cwith|2|2|7|7|cell-rborder|1ln>|<cwith|2|2|8|14|cell-halign|c>|<cwith|2|2|8|14|cell-valign|c>|<cwith|2|2|14|14|cell-tborder|0ln>|<cwith|1|1|8|14|cell-bborder|0ln>|<cwith|2|2|14|14|cell-bborder|0ln>|<cwith|3|3|14|14|cell-tborder|0ln>|<cwith|2|2|14|14|cell-lborder|0ln>|<cwith|2|2|13|13|cell-rborder|0ln>|<cwith|2|2|14|14|cell-rborder|0ln>|<twith|table-width|1par>|<twith|table-hmode|exact>|<cwith|8|8|1|1|cell-background|pastel
cyan>|<cwith|6|6|1|1|cell-background|pastel