I need my program to have a graphical interface when run either
locally or on a remote server.  My options are either JavaScript and
Java for the GUI front-end that communicates with the main Python
program.

Does anyone have any thoughts on using one over the other?  Although
Java
has the drawback that it isn't as widespread and seamless as
JavaScript, it does have powerful graphics capabilities.  Do you think
Java would produce smoother animation?

I would appreciate it if anyone has any links to JavaScript libraries
(or general suggestions on making a JavaScript GUI front-end that
communicates with a Python program) that might be helpful.

Here are links to Phun/Algodoo, a powerful commercial 2D physics
program
that gives students a qualitative understanding of physics principles.
http://www.youtube.com/watch?v=0H5g9VS0ENM
http://www.algodoo.com/wiki/Home
That is the bar I am aiming for (with quantitative output too).

Kevin Stueve


On Nov 13, 5:09 pm, kstueve <kevin.stu...@gmail.com> wrote:
> To sage-dev
> Can someone please explain to me what traits are in the context of
> tvisual?  The wiki page for it (http://www.enthought.com/traitsfrom
> the pagehttps://svn.enthought.com/enthought/wiki/TVTKIntroduction) is
> a dead link.
> A google search of either vpython.org or svn.enthought.com produces
> many results for visual, but none for tvisual.  I am guessing that
> tvisual is part of TVTK and visual part of VPython.
>
> I see tvtk at the 
> pagehttps://svn.enthought.com/enthought/wiki/TVTKIntroduction
> (traited vtk), and vtk 
> athttp://mayavi.sourceforge.net/.http://www.vtk.org/says that vtk is the 
> visualization toolkit.
>
> Jason Grout said "Since we also already have momentum for
> incorporating mayavi.."  Can someone please give me details.  Is Jason
> saying that Sage-dev is in the process of making mayavi part of Sage,
> so it would be easy to use parts of mayavi?
>
> What are the benefits of using tvtk over vpython?  Vpython is faster.
> How does Tvtk has a cleaner API?
>
> Does pydy handle collisions and contact forces?  I have read papers
> that say that calculating contact forces for a large number of
> simultaneously contacting rigid bodies is an NP-hard problem that
> involves quadratic programming.  There is lots of interdependency.
> You can have a normal force and friction force at each contact point.
> But you have to make sure that normal forces only push, not pull, and
> you have to make sure that kinetic friction opposes motion (or pending
> motion), and static friction is less than mu * Fn.  During a collision
> you have to have an infinite force for an instant to keep the objects
> from colliding.  If you take the time integral of force, you get
> impulse, which is a change in momentum (mass times velocity), so what
> you are basically saying is that you have an instantaneous transfer of
> momentum.  If you have an ellipse roll, the normal force will increase
> sharply to a maximum at the location of least curvature.  If you have
> a "rounded square" defined by a certain equation, the normal force
> will reach infinity at the location of zero curvature.  However, the
> area under the curve is finite, meaning that an instantaneous impulse
> is not occurring.  You just need a very good numerical integrator.
> Including kinetic friction can lead to situations where an
> instantaneous impulse is needed to prevent inter-penetration at times
> other than a collision.  Additionally, in some cases there are
> multiple allowed solutions for where the objects go.
>
> I have considered using the penalty method for handling collisions,
> which involves allowing inter-penetration and a virtual spring force
> that appears during inter-penetration.  However very large spring
> constants must be used, leading to stiff equations.  One benefit of
> penalty methods is that the multiple solutions in impulse methods go
> away-which solution you end up with depends on whether the objects
> that are touching are inter-penetrating or just touching.
>
> I am also considering handling only collisions between two objects at
> a time (with rotation and friction), since most problems I want PPS
> (PythonPhysicsSimulation) to handle would be covered.  One problem
> that might be left out is two gliders on a track colliding, but for
> this problem, you could lock the gliders to the track and consider the
> gliders hitting as collision of two bodies, not three.  I think that
> if you are careful, you could properly handle the gliders on a track
> colliding with only two-object collision handling.
>
> What I want to make is a program that does for freshman physics
> (springs, ramps, collisions, rotation, pulleys, strings, etc) what my
> circuit program at circuitengine.com does for freshman circuits (and
> hopefully more).  You click a button and make a spring, ramp, block,
> pulley etc.  You right click an object and adjust its properties.  You
> hit start.  You can make graphs.  You can ask it to tell you how long
> it takes for something to happen (e.g. height of object A is 10m), and
> it uses some sort of decrease and conquer (binary search in the worst
> case, but better can be done if we make an estimate of when the event
> happens) to find the exact time that that happens.
>
> Could anyone recommend any programs that have this sort of
> functionality for me to look at?
>
> Does anyone have any thoughts on using OpenModelica?
>
> Another question:
> Time permitting, I would like to be able to solve symbolic physics
> problems.  Instead of just giving initial conditions and solving for
> later values, it would be nice to say (symbolically) "it takes t
> seconds for the ball to reach the basket, at what angle was it
> thrown".  How might you go about this?  I think that this could be
> done using a theorem prover of sorts that searches the space of
> theorems that can be proven from a small set of axioms and givens and
> a set of manipulation rules.  Of course this is an NP-complete problem
> that is intractable in general (think Fermat's last theorem), but most
> problems given to freshman physics students are only a few steps long,
> meaning that the tree of possible proofs is relatively small and can
> be exhaustively searched.
> Does Sage have the ability to symbolically simplify "sin^2(theta)+cos^2
> (theta)" to "1"?
>
> For numeric problems such as "at what angle must the ball be thrown to
> reach the basket in 2 seconds?", it might be possible to use some sort
> of binary search to find the correct value.
>
> Here is a link to my (very early) pre-draft of my writeup, so that you
> can view the bibliography.http://docs.google.com/View?id=df9q29vh_45dfx2wmfg
>
> I declare Crocker's rules.  http://www.sl4.org/crocker.html
>
> Kevin Stueve
>
> On Sep 23, 3:31 pm, Fernando Perez <fperez....@gmail.com> wrote:
>
>
>
> > On Wed, Sep 23, 2009 at 4:41 AM, Prabhu Ramachandran
>
> > <pra...@aero.iitb.ac.in> wrote:
> > > Thanks Fernando.  The speed issue is still true but I wouldn't blame
> > > traits since that isn't the source of the bottleneck. I think there are
> > > a little too many events and too many renders. I have not had the time
> > > to profile it carefully.
>
> > Thanks for the clarifications, Prabhu.  I remembered the performance
> > drop, but wasn't sure what all of the reasons were under the hood and
> > I was worried I could misrepresent the issue.
>
> > It would really be great to have vpython-like performance with the
> > clean tvtk api!  Here's to hoping it's possible :)
>
> > Cheers,
>
> > f
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to