We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello, I am a high school teacher and thinking about using Processing in the classroom. Students are issued district laptops and it is very difficult/almost impossible to get IT to download/update software. Is there a browser-based version of Processing? I completed the Processing beginners' tutorial (Hour of Code) and was able to do a little coding online.
Answers
There's a Processing spin-off based on a Pjs fork @ Khan's Academy: B-)
https://www.KhanAcademy.org/computing/computer-programming
However the syntax there is JavaScript, not Java. ~O)
Still on JS syntax, there's the latest spin-off p5.js. There are some web IDEs for it: :bz
@alicef -- see also a recent discussion of students posting work and online grading with p5.js --
https://forum.processing.org/two/discussion/19456/education-uploading-sketches
Thanks! Is there a web-based version of Processing in Python by any chance?
Sadly, no. The web-based version of Processing uses JavaScript in order to run in a browser. Processing.py compiles to Java, not JavaScript:
See discussion: https://forum.processing.org/two/discussion/19326/
Thanks so much! Using a web IDE such as http://p5ide.herokuapp.com/editor, is it possible for a novice programmer/classroom math teacher to create a graphic image of a polygon that is reflected across a defined line; rotated around a defined point; and/or translated by a defined vector.
Also, is it possible to click and drag points so that if objects are defined by transformations, the image changes appropriate - similar to GeoGebra.
Here's an example: http://www.codeskulptor.org/#user40_jApncvZy6B_1.py
You should take a look at p5.js' reference in order to have an idea about what can be done w/ its API: http://p5js.org/reference/
Also some of its 3rd-party libraries: http://p5js.org/libraries/
This is trivially easy in any version of Processing (Java, JavaScript Python, Ruby) using any IDE. Check out:
...like so:
...although the "defined line" part needs to be carefully implemented, as in general you reflect before you draw (unless you want to buffer an image and then manipulate it).
Yes, with mouseClicked(), mousePressed(), and mouseDragged(). You will need to define your points, and then check whether your click is close to a point in order to begin modifying it. See this example that implements clicking and dragging:
Edit: note that my examples are from Processing(Java), although the corresponding p5.js is almost exactly the same.