--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/44097b88-2388-4e1a-8d0e-7b9326c1c721%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/CAB-sx61E5qSbkJUg6tJ_P-7g7QbEW7e-zAM6Sa48nsbL3OTOhA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/683e2679-2c12-4dce-b071-2f9da559bd6a%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/625beb94-7053-4f25-b75b-1df5fba56d8b%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/d19a9365-eb1d-4ad6-8df0-304f03f4e9c6%40googlegroups.com.
Bruce,
I'm in Winston Salem, and the local Python user group meets at WFU. We had a presentation on vpython back in July 2013:
http://www.pyptug.org/2013/07/pyptug-meeting-july-22nd.html
Dr Aaron Titus teaches physics at High Point uni. He is aware of Brython through PYPTUG. perhaps he could help in finding students.
I've also introduced Gary Bishop of UNC chapel hill to Brython, and to some folks at NCSU.
I'll also be presenting at tripython (Raleigh Durham area python user group) in march,many members from UNC and ncsu.
Between all these avenues, it would be a shame if we can't find some teacher/students interested in helping.
Francois
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/5feaafdc-98b1-4c10-84ac-f1b68ef824ca%40googlegroups.com.
BillyI am not an expert in Vpython, OpenGL or WebGL. So this might be an overwhelming task. What do you think?Bruce,I noticed you are a contributor to the vpython source code, so you know the code much better than I do. The approach we would have to take is to convert the C code to python and/or javascript, and calls made to OpenGL libraries would need to be converted to WebGL.
On Sat, Feb 8, 2014 at 12:16 AM, Bruce Sherwood <bruce.s...@gmail.com> wrote:
I'm confused, doubtless because I don't know anything about Brython other than I want to use it. I would think the VPython code is useless, since it is mostly written in C++ and uses CPU-based OpenGL for graphics, not GPU-based WebGL. Presumably Brython can call libraries written in JavaScript? And surely Brython can't call libraries written in C++? What am I missing?In principle yes, I would be interested in being a co-mentor. A few years ago I mentored a student in Brazil in the GSOC.Bruce
On Friday, February 7, 2014 5:49:53 PM UTC-7, Billy Earney wrote:Bruce,I think migrating the vpython code is the way to go. We can use glowscript as a source if we get stuck migrating parts of the code. :)SeeWould you be interested in being a co-mentor (with myself) for the VPython Google Summer of Code Idea?Billy
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/CAB-sx62WryUj%3DJHz5SDCTx1S_XTs2Sa49EHQGJCACxVv4QsuFA%40mail.gmail.com.
And a minor correction: As I said earlier, the core of VPython is not written in C, it's written in C++. I don't know whether that makes a difference as far as the Brython environment is concerned.Bruce
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/40d54b8b-fa1a-4ae1-9725-11787d3ea61c%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/CA%2BWuaSd3yyzAvRuwhKTqRtYXVmW_eLy0tvdbvZi28g5mvOzuLA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/134088e0-aac2-40a9-8dc2-92f050d2b0ad%40googlegroups.com.
A different environment is someone outside the glowscript.org environment (who might be using Brython) who wishes to use the GlowScript libraries. There is already, in the GlowScript Help, documentation on how to do this:
You'll see in this documentation that in this fully "exterior" case, lacking the preprocessing phase at glowscript.org, one has to say A.add(B) instead of A+B for vector addition (operator overloading issue) and one has to write asynchronous code rather than synchronous code. One currently has to write in JavaScript, not CoffeeScript or Brython, or equivalently compile CoffeeScript or Brython to JavaScript.
I seem inadvertently have given the impression that glowscript.org does server-side processing. No, all the work is done in the client. The only server-side stuff has to do with hosting user programs.
It would be useful to repackage the GlowScript chain "(language of your choice) -> JavaScript -> operator overloading and synchronous-to-asynchronous" so that environments outside glowscript.org could take advantage of this scheme. To put it another way, currently one can from outside the glowscript.org environment take advantage of the run-time portion of the GlowScript libraries but cannot easily take advantage of the compilation machinery. This is unfortunate not just for general use of GlowScript mechanisms but even within the glowscript.org environment itself, in that a GlowScript program can import outside libraries with the get_library() function, but currently that library has to be written in asynchronous non-operator-overloaded JavaScript.
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/CA%2BWuaSes5q54Sy0dgbd%3DAse%3Dr9jW0S4EracCBRDiehhjL0%2B6PA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/CA%2BWuaSeGD-re6e9-%3Dbr0xuxZNTu%2Be9N1dsgfZ1gQGu%3D7AQAWVg%40mail.gmail.com.
Note that there are lots of examples available by clicking on "Example programs" at glowscript.org.All of the basic graphics primitives are very similar (more similar in fact than the corresponding graphics primitives in VPython). In the Help, read the description of the cylinder object to get a feel for the attributes of these primitives. It is of course true that there's also a sizable number of other things to be accessed, such as the rotate method, controlling the size and background color of the canvas, etc. If you get things started and establish a pattern, it would probably be easy for me to fill in the blanks.
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/CA%2BWuaSd4ST%2Bx1j6hdBWz0BbTYBK%2BDT5c7qrjE3FVoojZqYrTDg%40mail.gmail.com.
> In terms of visualization we only use numpy as a container of data and itWe'll probably start using NumPy more heavily pretty soon with the
> should not be too hard to make these part independent of numpy. The parts
> that *do* use numpy for calcualtions are right now limited to calculating
> normals in the mesh reader, I think.
transform layer (for CPU transformations). Also, some complex
interactive features for plotting will probably require NumPy.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/CAB1ii-eOzyjSDV12%3DnAVkCd_9YpGZdzE_5gX1e9D991Sw7SheQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/CA%2BgUBLTW88LgZ%2B8EvzTz-9cBqjydPSjNgkut7KK1Wa9YynchjQ%40mail.gmail.com.
The file box.py imported by __init__.py enables not only the box object but also lets me set its color in the box constructor (color=color.cyan), but setting opacity has no effect and setting pos leads to no box visible but no error indication. I'm puzzled how the color attribute can work but the pos and opacity attributes don't. Seems like they're on the same footing. Also, I note that while I can set the box color in the constructor I can't change the color later by executing _box.color = color.red.
I don't see where/how the primitives.py module is invoked, yet I can create a cone object (though I can't set its color). Shouldn't we import from something like primitives.py, not from something like box.py?
What you can tell me about these questions may make it easier for me to understand the architecture.I'll mention that the statements_gs=glow.glow('glowscript')_scene=glow.canvas()are initializations that GlowScript (like VPython) executes if and when the program creates a displayable object such as a box; they aren't statements that appear in user programs. But this is presumably a detail.I'll also mention that although it is considered for good reasons to be Bad Practice, especially in sizable projects, we have our novices do inclusive imports to simplify their short programs. At this stage in their development it is more important that all the batteries be included than it is to deal with namespaces. Among the things we import for the novice is the math library, so that one can write cos instead of Math.cos or math.cos. In this context, "scene" is the name of a canvas that is created if the user doesn't create one. Here is a typical VPython or GlowScript version of your program (and it works with your machinery):from glow import *glow('glowscript') # initialization; should not be needed herescene = canvas() # also should not be needed herescene.width = scene.height = 400cube = box(color=color.cyan)def spin():cube.rotate(angle=0.01, axis=vector(0,1,0))rate(100, spin) # make spin a callbackspin()
I append below output from the Chrome console, which says we're looking for some nonexistent files (yet the rotating box works).
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/c11f5dad-445b-492f-9f74-7a67c7745a6c%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/CAB1ii-fYbPMEc4ohDsd6aa3Lf6DXmHwHoPQqcSzWZeKB%3DP6pmw%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/CA%2BWuaSe6TNuviyDbLWOWav1Go3ReAm1BbVmWHkLm_xkX3Rib6g%40mail.gmail.com.
I realize that there will be a performance hit, but presumably not a factor of 50. And I expect that the actual graphics rendering will be essentially unaffected, because to render the scene there is one call (implicit in the rate function) to a render function written in JavaScript and GPU shader language, and that function typically takes milliseconds to complete.Bruce
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/CA%2BWuaSf%3DXGhXB3pCtjQCB5La_Jym_AWf4nmWFJ22OGBEdXa4Bw%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/1814b360-f2db-4e28-90e4-2750e1162784%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/c4bb5f25-debf-4d05-9583-d6a5d06cb4d5%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "brython" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/brython/p2oz_BK1_3A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to brython+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/CAOLi1KB%3DtA_1D%3DzpOU25zTU5NTMDJCHtgFOd6bVPvH1OY5yyYg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/71ad6d33-697a-483d-be6f-6c2fde8948ee%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/CA%2BWuaSfvexMn0qL8QurNYUEGKLS-bO0JNuorMzNNwGR3vgX_qQ%40mail.gmail.com.
Billy, please update your primitives.py file to the one I sent a few messages ago. It contains important changes. As a convenience, I attach it again.
Bruce
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/CA%2BWuaSfJThqaQLrvcY2Keq2885JUSK_m5Y%3DYUgQod_EOMhFiDA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/CA%2BWuaScfECeQYp9htjE%2BKpDWYfSE8ETjeeY3K%2BR%2BJhQUvw%3D%2Bzg%40mail.gmail.com.
Billy, getting the GlowScript curve object working (http://www.glowscript.org/docs/GlowScriptDocs/curve.html) looks maybe a bit challenging; I don't think I can do it myself because it isn't simply a matter of copying the wrappers you've already implemented. Note that for adding points to the curve it uses the JavaScript "push" method rather than the Python "append" method. Not clear to me whether the end user should say _curve.push or _curve.append. In any case, neither of these work currently. The curve object is important in particular for leaving trails behind a moving object.Bruce
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/CA%2BWuaScbRpgJ2zQxA3fDj8EMwThWkNRzL0EadmiiiWzbbTY_gg%40mail.gmail.com.