py5coding / py5book

juypter book repo for py5
https://py5coding.org/
64 stars 10 forks source link

Miscellaneous things spotted while reading the documentation.... #63

Closed hx2A closed 1 year ago

hx2A commented 1 year ago

I've read through half of the tutorials and I want to first point out that I am consistently impressed with your insight for how to explain Python and py5. You are very thorough with your explanations and reading this is actually teaching me things about how to teach to beginners. Thank you for that.

I did notice a few typos or minor errors along the way and have listed them below.

In the variable section there is a block of code that has what looks like the beginning of an html img tag. Is that a typo?

size(600, 400)
background('#004477')

x = 1 # Declaring a variable called x and assigning 1 to it
y = 30
w = 20
h = w
<img srect(x,y, w,h)

On the same page in the "image reveal task" there is a broken link. It is right before the "See how that worked?" sentence.

This section has a link to grid.png as its own paragraph. Did you intend to display grid.png also, or did you want to just link to the page?

This page has a broken image link after the "These values will diverge as theta changes, with perfectly opposite values at 135 degrees." sentence.

hx2A commented 1 year ago

Continued...

Your comment about printing the mouse event object ("The data returned by just printing e is pretty useless") inspired me to open this issue:

https://github.com/py5coding/py5generator/issues/209

When I do fix it (by January?) we'll need to change that sentence.

This page has http links to amoeba.py and microscope.py, which I don't think was your intent. The build process does try to identify text that is a valid http link and automatically create links for them. You can subvert this by using backticks.

Something I struggled with when learning Processing is remembering which direction is +Z and -Z. I found the key to remembering is that the coordinate system is what is called a left handed coordinate system. If you point your thumb in the +X direction, index finger in +Y, and then bend your middle finger, it will point in the +Z direction. You can also use your left hand for rotations and figuring out which direction is for a positive rotation.

OpenGL, however, is a right handed coordinate system. So you must use your right hand to figure out which way +Z is and which way is a positive rotation.

It might be worthwhile to tell people to use their left hands to remember which way +Z is and also to point out that the way Processing and py5 does it is not an absolute law. As people learn more about creative coding they will encounter other coordinate systems and it is best to first check to see what the coordinate system is.

marcovicci commented 1 year ago

Thanks for these! Fixed in this PR: https://github.com/py5coding/py5book/pull/65

I forgot all about handedness; this allows me to use an image of one of my favorite banknotes, the 200 Swiss Francs note, which actually has an x,y,z right-hand rule shown off on it :)

hx2A commented 1 year ago

I forgot all about handedness; this allows me to use an image of one of my favorite banknotes, the 200 Swiss Francs note, which actually has an x,y,z right-hand rule shown off on it :)

I didn't know the Swiss put that image on their currency, but how wonderful that they do! This is a great reference to include in the tutorials.

I have merged the PR and will build it now.