Re: Pythonic Geometry
Wes Turner via Edu-sig <[email protected]> Wed, 9 Oct 2024 17:48:10 -0400
| Newsgroups | gmane.comp.python.education |
|---|---|
| Message-ID | <CACfEFw_X18K5wakTt2kMCWcBz2LWp51ukMAQzOHSySP+eUVvQw@mail.gmail.com> |
--===============5126114135051041374==
Content-Type: multipart/alternative; boundary="00000000000073b87906241236cc"
--00000000000073b87906241236cc
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
- matplotlib.animation FfmpegWriter supports encoding as webp looping "gif"
images
- "ENH: add webp support to IPython.display.Image"
https://github.com/ipython/ipython/pull/14526
>>> z, x, y =3D theta, cos(theta), sin(theta)
- ~ ipywidgets + mpld3?
- Plotly 3d charts and Shapes are interactive, and optionally there's Dash
- Mayavi is built on VTK
- Manim geometry
https://docs.manim.community/en/stable/reference/manim.mobject.geometry.lin=
e.Line.html
- SymPy geometry
https://docs.sympy.org/latest/modules/geometry/index.html
- Sensorcraft curriculum also depends upon pyglet for OpenGL, but not yet
WebGL IIUC
https://docs.sympy.org/latest/modules/plotting.html#module-sympy.plotting.p=
ygletplot
- p5.js in JupyterLite
- Khan Academy's Computer Science tuts have ProcessingJS, which p5 js is
like
- Pixar in a Box storytelling and Computer Graphics curriculum
- GeoGebra is great for drawing geometric figures
- TODO: f(x) =3D
e**pi*i*x
e**x*I*pi
- JSXGraph
- https://pypi.org/project/jsxgraph-magic/
- panda3d also compiles sim games to WASM
- EXERCISE: build a math game to teach and quiz
- TuxMath web is like MC is like Asteroids
- retro games
- text entry on a handheld without a keyboard makes for bad game UX
- > STORY: Users can load a deck of questions to be presented at various
points in the game. If ~'learning mode' is on, display an on screen
indicator indicating that must_answer_to_advance=3DTrue for the given
workstation.
https://github.com/SuperTux/supertux/issues/3054#issuecomment-2323305552
- https://www.google.com/search?q=3D2d+physics+js+site%3Agithub.com
...
TODO: DOC: Jupyter scipy stacks docs: to build atop the scipy stack
containers with {mamba,conda,pip,JupyterLab, [...]} that mybinder.org
already has cached, with Fedora and other distros with container-selinux:
```sh
echo "FROM scipy-stack" > Dockerfile
echo "USER 1000:100" >> Dockerfile
echo "RUN /opt/conda/bin/mamba install -y jupyterlab_miami_nights" >>
Dockerfile
(set -x; cat Dockerfile)
# man podman-build; man podman-run
podman build . -t localhost/example2
podman run --rm -p 8888:8888 -v ${PWD}:/home/jovyan/work
--userns=3Dkeep-id:uid=3D1000,gid=3D100 --security-opt label=3Ddisable -it
localhost/example2
```
TODO: DOC: repo2podman & repo2docker example
python -m ensurepip
python -m pip install pipx
pipx install repo2docker repo2podman
repo2docker -- TODO
TODO: DOC: repo2jupyterlite ; build a *WASM* container, that runs in a
browser
What does emscripten-forge have for geometry?
Which of these [Python,] tools for geometry work with ottergrader
auto-gradeable notebooks?
On Wed, Oct 9, 2024, 9:50=E2=80=AFAM kirby urner via Edu-sig <edu-sig@pytho=
n.org>
wrote:
>
> Long timers here might remember Arthur Siegel's PyGeo, still on
> Sourceforge <https://pygeo.sourceforge.net>. He and I used to endlessly
> debate, here on this edu-sig listserv, the relative advantages of this or
> that pythonic pedagogy, but were in agreement that VPython
> <https://vpython.org>, or Visual Python, was in the toolkit.
>
> We managed to meet up in New York City, then I had to abort a second
> meetup at a Pycon and yada yada... I only met him in person that one time=
.
> No Zoom yet.
>
> Where is VPython today and who is using it?
>
> The physics teaching subculture is where it comes from and where it still
> thrives from what I can tell. I managed to get invited to an AAPT meetup
> <https://worldgame.blogspot.com/2010/07/physics-conference.html> (America=
n
> Association of Physics Teachers) by Dr. Bob Fuller, then its president, a=
nd
> to sit in on some VPython talks.
>
> However, short of full scale animation, ala Blender
> <https://www.blender.org> today, we have the ray-tracer as a genre, and
> the ability to render stills. What brought me to Python in the first plac=
e,
> on a pilgrimage <http://4dsolutions.net/ocn/oopalgebra.html> through
> several languages (starting with FoxPro), was my appetite for computer
> graphics, geometric in particular. Today I'm on several Facebook groups
> that feed that appetite. Sometimes I roll my own.
>
> If you're new to Python and/or maybe looking for something more off the
> beaten path, not data science, not AI, then I recommend the free and open
> source stack I'm continuing to toy with: Python + povray, the latter comi=
ng
> from a CompuServ heritage, with an open source license predating anything
> GNU GPL.
>
> The animated GIFs <https://groups.io/g/synergeo/message/2735> I'm making
> also make use of Fiji <https://fiji.sc>, another free open wrapper. I
> write and run Python scripts
> <https://github.com/4dsolutions/School_of_Tomorrow/blob/master/flextegrit=
y.py>
> to generate Scene Description Language for POV-Ray
> <https://www.povray.org>, render say 7 - 9 frames, then sequence them
> into a single GIF file <https://groups.io/g/synergeo/message/2739>, where
> Fiji lets you control both framerate and whether to keep looping or not.
>
> My contention has always been: it's a two way street i.e. we're not only
> learning Python in order to master more math; we're learning math to writ=
e
> more interesting Python. The math I've been learning, around polyhedrons,
> has given me hours of coding enjoyment and a deeper understanding of
> spatial geometry.
>
> Kirby
>
> _______________________________________________
> Edu-sig mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3/lists/edu-sig.python.org/
> Member address: [email protected]
>
--00000000000073b87906241236cc
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"auto">- matplotlib.animation FfmpegWriter supports encoding as =
webp looping "gif" images=C2=A0<div dir=3D"auto">=C2=A0 - "E=
NH: add webp support to IPython.display.Image" <a href=3D"https://gith=
ub.com/ipython/ipython/pull/14526">https://github.com/ipython/ipython/pull/=
14526</a></div><div dir=3D"auto">=C2=A0 =C2=A0 =C2=A0>>> z, x, y =
=3D theta, cos(theta), sin(theta)</div><div dir=3D"auto"><br></div><div dir=
=3D"auto">- ~ ipywidgets + mpld3?</div><div dir=3D"auto"><div dir=3D"auto">=
- Plotly 3d charts and Shapes are interactive, and optionally there's D=
ash</div><div dir=3D"auto"><div dir=3D"auto">- Mayavi is built on VTK</div>=
<div dir=3D"auto">- Manim geometry</div><div dir=3D"auto">=C2=A0 <a href=3D=
"https://docs.manim.community/en/stable/reference/manim.mobject.geometry.li=
ne.Line.html">https://docs.manim.community/en/stable/reference/manim.mobjec=
t.geometry.line.Line.html</a></div><div dir=3D"auto">- SymPy geometry</div>=
<div dir=3D"auto">=C2=A0 <a href=3D"https://docs.sympy.org/latest/modules/g=
eometry/index.html">https://docs.sympy.org/latest/modules/geometry/index.ht=
ml</a></div><div dir=3D"auto">=C2=A0=C2=A0</div><div dir=3D"auto">=C2=A0 - =
Sensorcraft curriculum also depends upon pyglet for OpenGL, but not yet Web=
GL IIUC</div><div dir=3D"auto">=C2=A0 =C2=A0 <a href=3D"https://docs.sympy.=
org/latest/modules/plotting.html#module-sympy.plotting.pygletplot">https://=
docs.sympy.org/latest/modules/plotting.html#module-sympy.plotting.pygletplo=
t</a></div><div dir=3D"auto"><br></div><div dir=3D"auto"><br></div><div dir=
=3D"auto">- p5.js in JupyterLite=C2=A0</div><div dir=3D"auto">=C2=A0 - Khan=
Academy's Computer Science tuts have ProcessingJS, which p5 js is like=
</div><div dir=3D"auto">=C2=A0 =C2=A0 - Pixar in a Box storytelling and Com=
puter Graphics curriculum</div><div dir=3D"auto"><br></div><div dir=3D"auto=
">- GeoGebra is great for drawing geometric figures</div><div dir=3D"auto">=
=C2=A0 - TODO: f(x) =3D</div><div dir=3D"auto">=C2=A0 =C2=A0 =C2=A0e**pi*i*=
x</div><div dir=3D"auto">=C2=A0 =C2=A0 =C2=A0e**x*I*pi</div><div dir=3D"aut=
o"><br></div><div dir=3D"auto">- JSXGraph</div><div dir=3D"auto">=C2=A0 =C2=
=A0- <a href=3D"https://pypi.org/project/jsxgraph-magic/">https://pypi.org/=
project/jsxgraph-magic/</a></div><div dir=3D"auto"><br></div><div dir=3D"au=
to"><br></div><div dir=3D"auto">- panda3d also compiles sim games to WASM</=
div><div dir=3D"auto">=C2=A0 - EXERCISE: build a math game to teach and qui=
z</div><div dir=3D"auto">=C2=A0 =C2=A0 - TuxMath web is like MC is like Ast=
eroids</div><div dir=3D"auto">=C2=A0 =C2=A0 - retro games</div><div dir=3D"=
auto">=C2=A0 =C2=A0 - text entry on a handheld without a keyboard makes for=
bad game UX=C2=A0</div><div dir=3D"auto">=C2=A0 =C2=A0- > STORY: Users =
can load a deck of questions to be presented at various points in the game.=
If ~'learning mode' is on, display an on screen indicator indicati=
ng that must_answer_to_advance=3DTrue for the given workstation. <a href=3D=
"https://github.com/SuperTux/supertux/issues/3054#issuecomment-2323305552">=
https://github.com/SuperTux/supertux/issues/3054#issuecomment-2323305552</a=
></div><div dir=3D"auto"><br></div><div dir=3D"auto">- <a href=3D"https://w=
ww.google.com/search?q=3D2d+physics+js+site%3Agithub.com">https://www.googl=
e.com/search?q=3D2d+physics+js+site%3Agithub.com</a></div><div dir=3D"auto"=
><br></div><div dir=3D"auto">...</div><div dir=3D"auto"><br></div><div dir=
=3D"auto">TODO: DOC: Jupyter scipy stacks docs: to build atop the scipy sta=
ck containers with {mamba,conda,pip,JupyterLab, [...]} that <a href=3D"http=
://mybinder.org">mybinder.org</a> already has cached, with Fedora and other=
distros with container-selinux:</div><div dir=3D"auto"><br></div><div dir=
=3D"auto">```sh</div><div dir=3D"auto">echo "FROM scipy-stack" &g=
t; Dockerfile</div><div dir=3D"auto">echo "USER 1000:100" >>=
; Dockerfile</div><div dir=3D"auto">echo "RUN /opt/conda/bin/mamba ins=
tall -y jupyterlab_miami_nights" >> Dockerfile</div><div dir=3D"=
auto">(set -x; cat Dockerfile)</div><div dir=3D"auto"># man podman-build; m=
an podman-run</div><div dir=3D"auto">podman build . -t localhost/example2</=
div><div dir=3D"auto">podman run --rm -p 8888:8888 -v ${PWD}:/home/jovyan/w=
ork --userns=3Dkeep-id:uid=3D1000,gid=3D100 --security-opt label=3Ddisable =
-it localhost/example2=C2=A0</div><div dir=3D"auto">```</div><div dir=3D"au=
to"><br></div><div dir=3D"auto">TODO: DOC: repo2podman & repo2docker ex=
ample</div><div dir=3D"auto"><br></div><div dir=3D"auto">=C2=A0 python -m e=
nsurepip</div><div dir=3D"auto">=C2=A0 python -m pip install pipx</div><div=
dir=3D"auto">=C2=A0 pipx install repo2docker repo2podman</div><div dir=3D"=
auto">=C2=A0=C2=A0</div><div dir=3D"auto">=C2=A0 repo2docker -- TODO</div><=
div dir=3D"auto"><br></div><div dir=3D"auto">TODO: DOC: repo2jupyterlite ; =
build a *WASM* container, that runs in a browser</div><div dir=3D"auto"><br=
></div><div dir=3D"auto">What does emscripten-forge have for geometry?</div=
><div dir=3D"auto"><br></div><div dir=3D"auto">Which of these [Python,] too=
ls for geometry work with ottergrader auto-gradeable notebooks?</div><div d=
ir=3D"auto"><br></div><div dir=3D"auto"><br></div></div></div></div><br><di=
v class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, Oct 9=
, 2024, 9:50=E2=80=AFAM kirby urner via Edu-sig <<a href=3D"mailto:edu-s=
[email protected]">[email protected]</a>> wrote:<br></div><blockquote class=
=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg=
b(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_defau=
lt" style=3D"font-family:verdana,sans-serif;font-size:small"><br></div><div=
class=3D"gmail_default" style=3D"font-family:verdana,sans-serif;font-size:=
small">Long timers here might remember Arthur Siegel's PyGeo, still <a =
href=3D"https://pygeo.sourceforge.net" target=3D"_blank" rel=3D"noreferrer"=
>on Sourceforge</a>. He and I used to endlessly debate, here on this edu-si=
g listserv, the relative advantages of this or that pythonic pedagogy, but =
were in agreement that <a href=3D"https://vpython.org" target=3D"_blank" re=
l=3D"noreferrer">VPython</a>, or Visual Python, was in the toolkit.=C2=A0</=
div><div class=3D"gmail_default" style=3D"font-family:verdana,sans-serif;fo=
nt-size:small"><br></div><div class=3D"gmail_default" style=3D"font-family:=
verdana,sans-serif;font-size:small">We managed to meet up in New York City,=
then I had to abort a second meetup at a Pycon and yada yada... I only met=
him in person that one time. No Zoom yet.</div><div class=3D"gmail_default=
" style=3D"font-family:verdana,sans-serif;font-size:small"><br></div><div c=
lass=3D"gmail_default" style=3D"font-family:verdana,sans-serif;font-size:sm=
all">Where is VPython today and who is using it?=C2=A0</div><div class=3D"g=
mail_default" style=3D"font-family:verdana,sans-serif;font-size:small"><br>=
</div><div class=3D"gmail_default" style=3D"font-family:verdana,sans-serif;=
font-size:small">The physics teaching subculture is where it comes from and=
where it still thrives from what I can tell. I managed to get invited to <=
a href=3D"https://worldgame.blogspot.com/2010/07/physics-conference.html" t=
arget=3D"_blank" rel=3D"noreferrer">an AAPT meetup</a>=C2=A0(American Assoc=
iation of Physics Teachers) by Dr. Bob Fuller, then its president, and to s=
it in on some VPython talks.</div><div class=3D"gmail_default" style=3D"fon=
t-family:verdana,sans-serif;font-size:small"><br></div><div class=3D"gmail_=
default" style=3D"font-family:verdana,sans-serif;font-size:small">However, =
short of full scale animation, <a href=3D"https://www.blender.org" target=
=3D"_blank" rel=3D"noreferrer">ala Blender</a> today, we have the ray-trace=
r as a genre, and the ability to render stills. What brought me to Python i=
n the first place, on <a href=3D"http://4dsolutions.net/ocn/oopalgebra.html=
" target=3D"_blank" rel=3D"noreferrer">a pilgrimage</a>=C2=A0through severa=
l languages (starting with FoxPro), was my appetite for computer graphics, =
geometric in particular. Today I'm on several Facebook groups that feed=
that appetite. Sometimes I roll my own.</div><div class=3D"gmail_default" =
style=3D"font-family:verdana,sans-serif;font-size:small"><br></div><div cla=
ss=3D"gmail_default" style=3D"font-family:verdana,sans-serif;font-size:smal=
l">If you're new to Python and/or maybe looking for something more off =
the beaten path, not data science, not AI, then I recommend the free and op=
en source stack I'm continuing to toy with: Python=C2=A0+ povray, the l=
atter coming from a CompuServ=C2=A0heritage, with an open source license pr=
edating anything GNU GPL.</div><div class=3D"gmail_default" style=3D"font-f=
amily:verdana,sans-serif;font-size:small"><br></div><div class=3D"gmail_def=
ault" style=3D"font-family:verdana,sans-serif;font-size:small">The <a href=
=3D"https://groups.io/g/synergeo/message/2735" target=3D"_blank" rel=3D"nor=
eferrer">animated GIFs</a> I'm making also make use of <a href=3D"https=
://fiji.sc" target=3D"_blank" rel=3D"noreferrer">Fiji</a>, another free ope=
n wrapper. I write and run <a href=3D"https://github.com/4dsolutions/School=
_of_Tomorrow/blob/master/flextegrity.py" target=3D"_blank" rel=3D"noreferre=
r">Python scripts</a> to generate Scene Description Language for <a href=3D=
"https://www.povray.org" target=3D"_blank" rel=3D"noreferrer">POV-Ray</a>, =
render say 7 - 9 frames, then sequence them into a <a href=3D"https://group=
s.io/g/synergeo/message/2739" target=3D"_blank" rel=3D"noreferrer">single G=
IF file</a>, where Fiji lets you control both framerate and whether to keep=
looping or not.</div><div class=3D"gmail_default" style=3D"font-family:ver=
dana,sans-serif;font-size:small"><br></div><div class=3D"gmail_default" sty=
le=3D"font-family:verdana,sans-serif;font-size:small">My contention has alw=
ays been: it's a two way street i.e. we're not only learning Python=
in order to master more math; we're learning math to write more intere=
sting Python. The math I've been learning, around polyhedrons, has give=
n me hours of coding enjoyment and a deeper understanding of spatial geomet=
ry.</div><div class=3D"gmail_default" style=3D"font-family:verdana,sans-ser=
if;font-size:small"><br></div><div class=3D"gmail_default" style=3D"font-fa=
mily:verdana,sans-serif;font-size:small">Kirby</div><div class=3D"gmail_def=
ault" style=3D"font-family:verdana,sans-serif;font-size:small"><br></div></=
div>
_______________________________________________<br>
Edu-sig mailing list -- <a href=3D"mailto:[email protected]" target=3D"_bl=
ank" rel=3D"noreferrer">[email protected]</a><br>
To unsubscribe send an email to <a href=3D"mailto:[email protected]"=
target=3D"_blank" rel=3D"noreferrer">[email protected]</a><br>
<a href=3D"https://mail.python.org/mailman3/lists/edu-sig.python.org/" rel=
=3D"noreferrer noreferrer" target=3D"_blank">https://mail.python.org/mailma=
n3/lists/edu-sig.python.org/</a><br>
Member address: <a href=3D"mailto:[email protected]" target=3D"_blank" r=
el=3D"noreferrer">[email protected]</a><br>
</blockquote></div>
--00000000000073b87906241236cc--
--===============5126114135051041374==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Edu-sig mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: [email protected]
--===============5126114135051041374==--