Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Graphical Physics Program Suggestions
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 28 - Collapse all  -  Translate all to Translated (View all originals)   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
kstueve  
View profile  
 More options Sep 22 2009, 2:14 pm
From: kstueve <kevin.stu...@gmail.com>
Date: Tue, 22 Sep 2009 11:14:00 -0700 (PDT)
Subject: Graphical Physics Program Suggestions
As my work on prime_pi and nth_prime is drawing to a close, William
Stein and I have discussed the possibility of me making a graphical
physics program to be included in Sage, the free open source math
program.

An example of the desired functionality is to either with a few lines
of code from within a Sage worksheet, or by clicking buttons in a
graphical user interface (GUI) create a physics problem with
components such as ramps, blocks, balls, pulleys, and springs, and
processes such as motion (translational or rotational), collisions
(elastic, inelastic, completely inelastic), and forces (friction,
gravity, normal forces, driving forces, etc).

I am expecting the VIGRE grant from the National Science Foundation
(NSF) to support my work, so I will be able to devote a lot of time to
this project.

I would like to obtain any and all suggestions for what features,
functionality etc. could be included in this program.  Please don't be
afraid to contribute an idea.  No suggestion is too large or too
small.

A few of the possible ideas that I have come up with so far:

Allowing time to be solved for-e.g. exactly how long does it take for
an event to occur, such as for velocity to reach 0.

Using multi-precision arithmetic and error analysis to solve a problem
to a specified accuracy-e.g. what is the velocity of an object at a
certain time to the 100th decimal (for problems that don't include too
much chaos).

Creating a human readable physics problem specification language that
allows the locations and properties of each component to be specified
(perhaps similar to standard circuit specification languages).

Allow matrices, systems of DEs, tables of values, etc that describe
the physics problem to be accessed with Sage commands.

Symbolic solving for problems that lend themselves to symbolic
solving.

Plotting variables such as velocity, kinetic energy etc. with respect
to time.

Plotting more complicated functions such as the amount of time a block
takes to slide to the bottom of a ramp with respect to the ramp's
angle.

Make architecture easily extensible so new components can be made by
the user

Three dimensional graphics and problems (after 2D is finished)

Kevin Stueve
kstu...@uw.edu


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fernando Perez  
View profile  
 More options Sep 22 2009, 3:27 pm
From: Fernando Perez <fperez....@gmail.com>
Date: Tue, 22 Sep 2009 12:27:42 -0700
Local: Tues, Sep 22 2009 3:27 pm
Subject: Re: [sage-devel] Graphical Physics Program Suggestions

On Tue, Sep 22, 2009 at 11:14 AM, kstueve <kevin.stu...@gmail.com> wrote:
> An example of the desired functionality is to either with a few lines
> of code from within a Sage worksheet, or by clicking buttons in a
> graphical user interface (GUI) create a physics problem with
> components such as ramps, blocks, balls, pulleys, and springs, and
> processes such as motion (translational or rotational), collisions
> (elastic, inelastic, completely inelastic), and forces (friction,
> gravity, normal forces, driving forces, etc).

You might want to have a look at vpython:

http://vpython.org/

It originated at Carnegie Mellon as a program to teach undergraduate
physics such that with very little code (and critically, no 3d
programming or OpenGL knowledge), one could

create a physics problem with

> components such as ramps, blocks, balls, pulleys, and springs, and
> processes such as motion (translational or rotational), collisions
> (elastic, inelastic, completely inelastic), and forces (friction,
> gravity, normal forces, driving forces, etc).

:)

Even if it doesn't fit precisely your needs, it's probably good
inspiration and has been around for ~ 9 years.  I've used it (the old
version) for small demos and it's really nice.

Cheers,

f


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
William Stein  
View profile  
 More options Sep 22 2009, 3:33 pm
From: William Stein <wst...@gmail.com>
Date: Tue, 22 Sep 2009 12:33:16 -0700
Local: Tues, Sep 22 2009 3:33 pm
Subject: Re: [sage-devel] Re: Graphical Physics Program Suggestions

Thanks for pointing that out.   So far, I've noticed Kevin is very
good at taking existing things and plugging them together.

Maybe he could provide an AJAX-style web-based interface to some
vpython functionality?

William


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jason Grout  
View profile  
 More options Sep 22 2009, 3:41 pm
From: Jason Grout <jason-s...@creativetrax.com>
Date: Tue, 22 Sep 2009 14:41:10 -0500
Local: Tues, Sep 22 2009 3:41 pm
Subject: Re: Graphical Physics Program Suggestions

William Stein wrote:
> Maybe he could provide an AJAX-style web-based interface to some
> vpython functionality?

Since we also already have momentum for incorporating mayavi, we should
also point out the mayavi tvtk "visual" module, whose api is modeled
after vpython:

https://svn.enthought.com/enthought/wiki/TVTKIntroduction#visual

I've used vpython too, and I thought it was really nice and simple.

Jason

--
Jason Grout


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ondrej Certik  
View profile  
 More options Sep 22 2009, 5:51 pm
From: Ondrej Certik <ond...@certik.cz>
Date: Tue, 22 Sep 2009 14:51:05 -0700
Local: Tues, Sep 22 2009 5:51 pm
Subject: Re: [sage-devel] Graphical Physics Program Suggestions

You might also consider integrating pydy in:

http://pydy.org/

it uses sympy to generate the equations of motion for a rigid body and
scipy to solve them.

Ondrej


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tom Boothby  
View profile  
 More options Sep 22 2009, 6:25 pm
From: Tom Boothby <tomas.boot...@gmail.com>
Date: Tue, 22 Sep 2009 15:25:44 -0700
Local: Tues, Sep 22 2009 6:25 pm
Subject: Re: [sage-devel] Graphical Physics Program Suggestions
I spent a while thinking that I was going to be a mechanical engineer,
and took a few of the ME intro courses.  Engineering statics and
dynamics can be phrased entirely in terms of linear algebra, though
the courses I took didn't present them as such.  Materials analysis is
highly computational in nature and could be interesting.  When I took
these courses, I'd spend about 1-2 hours a week programming my TI
calculator to do my homework, and about 5 minutes actually doing my
homework (for the record, my professors were aware of, and pleased as
punch with this approach).

When I took the physics prerequisites for these courses, the problems
we had to do were 1-2 variable toys.  The engineering homework
frequently had a number of rigid bodies in motion relative to one
another -- and involved solving systems of linear equations in 6-10
variables.  If I were you, I'd look through Hibbeler's texts for
"typical" problems that it should be easy to input and solve.  In
fact, you can borrow my copy some time, if you like.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fernando Perez  
View profile  
 More options Sep 22 2009, 9:50 pm
From: Fernando Perez <fperez....@gmail.com>
Date: Tue, 22 Sep 2009 18:50:28 -0700
Local: Tues, Sep 22 2009 9:50 pm
Subject: Re: [sage-devel] Re: Graphical Physics Program Suggestions

On Tue, Sep 22, 2009 at 12:41 PM, Jason Grout

<jason-s...@creativetrax.com> wrote:
> Since we also already have momentum for incorporating mayavi, we should
> also point out the mayavi tvtk "visual" module, whose api is modeled
> after vpython:

> https://svn.enthought.com/enthought/wiki/TVTKIntroduction#visual

> I've used vpython too, and I thought it was really nice and simple.

Prabhu may comment with more information, but in the meantime, it's
worth keeping in mind that 'tvisual' has significantly lower
performance than visual, and in this case I'm not sure it can be
fixed.  The issue is that the traits event handling machinery proves
to be too much overhead when you're trying to render a 3d scene at
interactive framerates, and the geometry is already being computed by
a python loop. Since tvtk is based on traits, all the traits machinery
is still active and in this case may be a bit too much.

If memory serves me right, Prabhu wasn't super optimistic about being
able to match vpython performance with tvisual, but I could (and would
love to) be misremembering, or perhaps it's just a matter of putting
manpower into it and not a fundamental limitation.

I just mention it so you are aware that out of the box, tvisual's
performance is just not enough to be usable like vpython is (and I
only tested it on fairly simple examples).

In case you'd like to run a simple comparison (and perhaps things have
improved), I'm attaching a simple example of parabolic motion written
both for vpython (old version) and tvtk/visual.  Caveat: I haven't run
this code in years, so I'm not sure it runs with today's vpython or
tvtk.

Cheers,

f

  shoot.py
3K Download

  shoot_t.py
3K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Prabhu Ramachandran  
View profile  
 More options Sep 23 2009, 7:41 am
From: Prabhu Ramachandran <pra...@aero.iitb.ac.in>
Date: Wed, 23 Sep 2009 17:11:56 +0530
Local: Wed, Sep 23 2009 7:41 am
Subject: Re: [sage-devel] Re: Graphical Physics Program Suggestions
On Wednesday 23 September 2009 07:20 AM, Fernando Perez wrote:

>> https://svn.enthought.com/enthought/wiki/TVTKIntroduction#visual

>> I've used vpython too, and I thought it was really nice and simple.

> Prabhu may comment with more information, but in the meantime, it's
> worth keeping in mind that 'tvisual' has significantly lower
> performance than visual, and in this case I'm not sure it can be
> fixed.  The issue is that the traits event handling machinery proves
> to be too much overhead when you're trying to render a 3d scene at
> interactive framerates, and the geometry is already being computed by
> a python loop. Since tvtk is based on traits, all the traits machinery
> is still active and in this case may be a bit too much.

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.

> If memory serves me right, Prabhu wasn't super optimistic about being
> able to match vpython performance with tvisual, but I could (and would
> love to) be misremembering, or perhaps it's just a matter of putting
> manpower into it and not a fundamental limitation.

I am not sure at all, since I haven't had the chance to look closely
enough but it is possible that there are too many events flying around
calling too much Python code.

> In case you'd like to run a simple comparison (and perhaps things have
> improved), I'm attaching a simple example of parabolic motion written
> both for vpython (old version) and tvtk/visual.  Caveat: I haven't run
> this code in years, so I'm not sure it runs with today's vpython or
> tvtk.

It does and visually there is no difference but there is an order of
magnitude speed difference between the two in terms of CPU time.

prabhu


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jaap Spies  
View profile  
 More options Sep 23 2009, 4:17 pm
From: Jaap Spies <j.sp...@hccnet.nl>
Date: Wed, 23 Sep 2009 22:17:04 +0200
Local: Wed, Sep 23 2009 4:17 pm
Subject: Re: Graphical Physics Program Suggestions

In Januari I made a very, very experimental spkg for vpython.
See:
http://sage.math.washington.edu/home/jsp/SPKGS/VPython/

Screenshots:
http://picasaweb.google.nl/j.spies88/Vpython?authkey=CFT7gXmyzAA#

Jaap


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fernando Perez  
View profile  
 More options Sep 23 2009, 7:31 pm
From: Fernando Perez <fperez....@gmail.com>
Date: Wed, 23 Sep 2009 16:31:14 -0700
Local: Wed, Sep 23 2009 7:31 pm
Subject: Re: [sage-devel] Re: Graphical Physics Program Suggestions
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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kstueve  
View profile  
 More options Oct 23 2009, 4:05 pm
From: kstueve <kevin.stu...@gmail.com>
Date: Fri, 23 Oct 2009 13:05:58 -0700 (PDT)
Local: Fri, Oct 23 2009 4:05 pm
Subject: Re: Graphical Physics Program Suggestions
Have any of you heard of Erik Neumann?  He published some excellent
Java physics demos at http://www.myphysicslab.com/  He is in Seatle,
and has attended UW.

I have been looking into vector graphics with javascript.  It appears
that circles, lines, and other curves are made out of lots of div
elements (to represent pixels and groups of pixels), most likely using
a third party library, such as jsDraw2D (see
http://ajax.phpmagazine.net/2009/04/jsdraw2d_javascript_graphics_l.html).

Kevin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Maurizio  
View profile  
 More options Oct 23 2009, 5:51 pm
From: Maurizio <maurizio.gran...@gmail.com>
Date: Fri, 23 Oct 2009 14:51:57 -0700 (PDT)
Local: Fri, Oct 23 2009 5:51 pm
Subject: Re: Graphical Physics Program Suggestions
I don't want to add confusion, but I hope you can also think about the
similarity between mechanical and electrical problems. After all, it's
always matter of solving differential equations, having voltage,
current, and so on, instead of mechanical quantities.
The good thing, from this perspective, is that you could take some
inspiration from the hundreds of SPICE tools, which already provide a
GUI to define electrical problems. If you transpose the analogous of a
netlist into something mechanical, you maybe already have a good
starting point, which also gives you compatibility to electrical
problem (which I would like :P).

Just to give a rough idea, you could read:
http://www.analog-europe.com/207200675
(this is just after some google search, but there are thousands of
references about circuit solvers).
The good thing, in my opinion, is that there is already a standard
notation for netlists. Maybe you could introduce the mechanical
equivalent of those :)

Regards

Maurizio

On 23 Ott, 22:05, kstueve <kevin.stu...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brandon.Barker@gmail.com  
View profile  
 More options Oct 24 2009, 1:28 pm
From: "Brandon.Bar...@gmail.com" <brandon.bar...@gmail.com>
Date: Sat, 24 Oct 2009 10:28:52 -0700 (PDT)
Local: Sat, Oct 24 2009 1:28 pm
Subject: Re: Graphical Physics Program Suggestions

On Sep 22, 6:25 pm, Tom Boothby <tomas.boot...@gmail.com> wrote:

> I spent a while thinking that I was going to be a mechanical engineer,
> and took a few of the ME intro courses.  Engineering statics and
> dynamics can be phrased entirely in terms of linear algebra, though
> the courses I took didn't present them as such.  

I've never had any ME courses and I'm also not very knowledgeable in
dynamical systems or physics, but I thought it was untrue that
linearization of the phase space is adequate to describe the dynamics
if the phase space isn't structurally stable:
http://en.wikipedia.org/wiki/Hartman-Grobman_theorem

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kstueve  
View profile  
 More options Nov 3 2009, 9:23 am
From: kstueve <kevin.stu...@gmail.com>
Date: Tue, 3 Nov 2009 06:23:48 -0800 (PST)
Local: Tues, Nov 3 2009 9:23 am
Subject: Re: Graphical Physics Program Suggestions
I am trying to make/find collision response code for arbitrary 2D
rigid bodies with rotation and friction (single point collisions).

I posted a question to the message board
https://sourceforge.net/projects/mjbworld/forums/forum/122133/topic/3...
for the site http://www.euclideanspace.com/physics/dynamics/collision/twod/index.htm.
Here is the question I asked:
"http://www.euclideanspace.com/physics/dynamics/collision/twod/
index.htm describes 2D collisions with friction and rotation between
two rigid bodies at a single point.

Define a coordinate system and naming convention such that "a"
corresponds to body "a", "b" corresponds to body "b", prime refers to
final values, a lack of a prime refers to an initial value, "x" refers
to the axis perpendicular to the plane of collision, and "y" refers to
the axis parallel to the plane of collision. Define A and B to be the
contact points of bodies a and b.

For the initial value problem, there are 6 unknowns (the final x and y
velocities and final angular velocities of each body), and there
should be 6 equations.

Because there is friction, energy is not necessarily conserved.

Let me propose the 6 equations:

1) coefficient of restitution equation: c = (vbx' - vax') / (vax -
vbx)

2) conservation of x momentum (on linked page)

3) conservation of y momentum (on linked page)

4) conservation of angular momentum about the center of mass (on
linked page)

Now integrate with respect to time the friction equation Ff = mu * Fn
(force of friction equals coefficient of friction times the normal
force) and applying the result to either point A or B.

Impulse due to friction (y-axis) = mu * x-axis impulse

Impulse due to friction (y-axis) = mu * delta x momentum

If the y components of the velocities of points A and B are equal, the
impulse due to friction on either point is automatically 0 (providing
the last two equations). Otherwise, there is going to be an impulse
due to friction on both points.

mass * delta y velocity = mu * mass * delta x velocity

delta y velocity = mu * delta x velocity (whatever mass represents
here it cancels out)

5) Frictional impulse of body a: change in y component of linear
velocity of point A = mu * change in x component of linear velocity of
point A

6) Frictional impulse of body b: change in y component of linear
velocity of point B = mu * change in x component of linear velocity of
point B

Are these equations correct?"

I then replied to my own thread with "After reading more of the site,
I realize that equation 1 must refer to the converging and diverging
velocities of points A and B, not the center of mass of body a or b."

On Sep 22, 10:14 am, kstueve <kevin.stu...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kstueve  
View profile  
 More options Nov 13 2009, 6:19 pm
From: kstueve <kevin.stu...@gmail.com>
Date: Fri, 13 Nov 2009 15:19:59 -0800 (PST)
Local: Fri, Nov 13 2009 6:19 pm
Subject: Re: Graphical Physics Program Suggestions
Tom,

Thanks.  I just bought Hibbeler's "Engineering Mechanics: Statics" and
"Engineering Mechanics: Dynamics" on Amazon.  I saved 99% (and spent
$1.57 + 2 * 3.99) because I bought old editions.

Kevin Stueve

On Sep 22, 2:25 pm, Tom Boothby <tomas.boot...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kstueve  
View profile  
 More options Nov 13 2009, 8:09 pm
From: kstueve <kevin.stu...@gmail.com>
Date: Fri, 13 Nov 2009 17:09:58 -0800 (PST)
Local: Fri, Nov 13 2009 8:09 pm
Subject: Re: Graphical Physics Program Suggestions
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/traits from
the page https://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 page https://svn.enthought.com/enthought/wiki/TVTKIntroduction
(traited vtk), and vtk at http://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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
William Stein  
View profile  
 More options Nov 13 2009, 10:44 pm
From: William Stein <wst...@gmail.com>
Date: Fri, 13 Nov 2009 19:44:38 -0800
Local: Fri, Nov 13 2009 10:44 pm
Subject: Re: [sage-devel] Re: Graphical Physics Program Suggestions

No.  To the best of my knowledge nobody is working on including
mayavai + vtk in Sage.  VTK is quite difficult to build, to put it
mildly.

> What are the benefits of using tvtk over vpython?  Vpython is faster.
> How does Tvtk has a cleaner API?

Note that tvtk and vpython don't work via a web browser.   Part of the
challenge of Sage -- and the opportunity -- is making capabilities
available via a webpage.   For that, the only options are javascript
(=AJAX) or Java.

> Does anyone have any thoughts on using OpenModelica?

It's license is GPL-incompatible.  However, I've been told they are in
the process of changing their license to be GPL-compatible.   I hope
this happens.

> 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),

Fermat's last theorem has nothing to do with NP complete problems, as
far as I know.  What connection were you thinking of?  I'm curious.

I'm also confused as to what doing physics symbolically has to do with
theorem provers.

> 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"?

Yes:
sage: var('theta')
theta
sage: f = sin(theta)^2 + cos(theta)^2
sage: f.trig_simplify()
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

And I exercise it :-)

William

--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kstueve  
View profile  
 More options Nov 14 2009, 12:51 am
From: kstueve <kevin.stu...@gmail.com>
Date: Fri, 13 Nov 2009 21:51:21 -0800 (PST)
Local: Sat, Nov 14 2009 12:51 am
Subject: Re: Graphical Physics Program Suggestions

On Nov 13, 7:44 pm, William Stein <wst...@gmail.com> wrote:

Automated theorem proving is NP-complete (because the boolean
satisfiability problem (which is NP-complete) reduces to finding a
proof of satisfiability (and a proof of satisfiability will exist with
length a fixed polynomial of the size of the original boolean
satisfiability problem) and proofs can be verified in time polynomial
of the length of the proof).  I gave Fermat's last theorem as an
example of the difficulty of finding the correct 300 page permutation
of symbols that represents a correct proof of a statement.  Perhaps it
sounded as if I was discussing trying many potential integer solutions
to x^n+y^n=z^n, which is not what I meant.
Asking a computer to find a 300 page proof of a statement like
Fermat's last theorem by search is a bad idea.  I think asking a
computer to find a 5 line solution to a simple symbolic physics
problem (the sort you find in freshman physics) might be a good idea.
I am curious about how trig_simplify works.  "return self.parent()
(self._maxima_().trigexpand().trigsimp())"
It doesn't seem to use search.  Does anyone know if there are any
components of Sage that use search by an automated theorem prover?
http://en.wikipedia.org/wiki/Automated_theorem_proving#Decidability_o...

> I'm also confused as to what doing physics symbolically has to do with
> theorem provers.

Theorem proving can be attacked by doing a search of all theorems that
follow from the axioms (although it will take time exponential in the
length of the theorem).  Many physics problems are presented
effectively as a set of equations.  Solving a set of equations
symbolically (that is designed to be solved symbolically by a student
in several steps) can be attacked by doing a search of the equations
that follow from the original equations for one that gives the value
in question.  The analogy to theorem proving is strong-you might be
searching for an equation/theorem of the form "x = _____"
As an example of the sort of problem for which I think search might be
useful (problem 83 on page 81 from Tipler Physics for Scientists for
Engineers):
"At 1/2 of it's maximum height, the speed of a projectile is 3/4 of
its initial speed.  What was its launch angle?"
This is a symbolic problem that cannot be solved by plugging values
into a projectile motion equation from an equation sheet.
Is there a better way to approach such problems from a programming
point of view?  I guess for this problem, you could just employ some
sort of numerical educated guess and check/Newton's method/binary
search algorithm, but such a solution does not show work or steps and
it would be easy to find a similar problem that is entirely symbolic.
Correct me if I'm wrong, but I believe that the only way to solve a
problem like this is to write down what you know and manipulate it
until you arrive at a solution (which is a search problem).


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kstueve  
View profile  
 More options Nov 15 2009, 6:42 pm
From: kstueve <kevin.stu...@gmail.com>
Date: Sun, 15 Nov 2009 15:42:14 -0800 (PST)
Local: Sun, Nov 15 2009 6:42 pm
Subject: Re: Graphical Physics Program Suggestions
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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pat LeSmithe  
View profile  
 More options Nov 15 2009, 6:58 pm
From: Pat LeSmithe <qed...@gmail.com>
Date: Sun, 15 Nov 2009 15:58:35 -0800
Local: Sun, Nov 15 2009 6:58 pm
Subject: Re: [sage-devel] Re: Graphical Physics Program Suggestions
On 11/15/2009 03:42 PM, kstueve wrote:

> 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.

There are some links at

http://wiki.sagemath.org/JavascriptResources


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kstueve  
View profile  
 More options Nov 15 2009, 9:08 pm
From: kstueve <kevin.stu...@gmail.com>
Date: Sun, 15 Nov 2009 18:08:09 -0800 (PST)
Local: Sun, Nov 15 2009 9:08 pm
Subject: Re: Graphical Physics Program Suggestions
SVG looks useful.  But it doesn't work on Internet Explorer without
special software.
http://en.wikipedia.org/wiki/Scalable_Vector_Graphics

When I developed a Java applet, I had to spend great amounts of time
researching the idiosyncrasies of different browsers on how to embed a
Java applet with parameters.  Since first being exposed to Java, the
<applet> tag had been deprecated, adding difficulty.

Then I learned that some operating systems don't have the latest
version of the Java Virtual Machine, and that some mice do not have a
right button.

If using JS (and related libraries) on all platforms may require extra
plugins, would Java make more sense, or do I just need to find ways to
use JS effectively?

Does anyone have any general suggestions on how I might want to
develop a GUI with animation and mouse interaction with JS?

Kevin Stueve

On Nov 15, 3:58 pm, Pat LeSmithe <qed...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pat LeSmithe  
View profile  
 More options Nov 15 2009, 11:45 pm
From: Pat LeSmithe <qed...@gmail.com>
Date: Sun, 15 Nov 2009 20:45:14 -0800
Local: Sun, Nov 15 2009 11:45 pm
Subject: Re: [sage-devel] Re: Graphical Physics Program Suggestions
On 11/15/2009 06:08 PM, kstueve wrote:

> If using JS (and related libraries) on all platforms may require extra
> plugins, would Java make more sense, or do I just need to find ways to
> use JS effectively?

> Does anyone have any general suggestions on how I might want to
> develop a GUI with animation and mouse interaction with JS?

It may be best to start with an existing package.  How about GeoGebra

http://www.geogebra.org/

?  Moreover, the best solution may involve both Java (e.g., for
rendering, interaction) and JavaScript (e.g., for control,
communication, updates).  I think Jmol and GeoGebra are both JS-able.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kstueve  
View profile  
 More options Nov 16 2009, 12:51 am
From: kstueve <kevin.stu...@gmail.com>
Date: Sun, 15 Nov 2009 21:51:05 -0800 (PST)
Local: Mon, Nov 16 2009 12:51 am
Subject: Re: Graphical Physics Program Suggestions
Pat, thanks for the links and suggestions.  They were helpful.
GeoGebra and Jmol are written in Java.  Jmol and GeoGebra can use
JavaScript to simplify embedding in a web-page.  Is this what you mean
by JS-"able"?

On Nov 15, 8:45 pm, Pat LeSmithe <qed...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pat LeSmithe  
View profile  
 More options Nov 16 2009, 1:03 am
From: Pat LeSmithe <qed...@gmail.com>
Date: Sun, 15 Nov 2009 22:03:10 -0800
Local: Mon, Nov 16 2009 1:03 am
Subject: Re: [sage-devel] Re: Graphical Physics Program Suggestions
On 11/15/2009 09:51 PM, kstueve wrote:

> GeoGebra and Jmol are written in Java.  Jmol and GeoGebra can use
> JavaScript to simplify embedding in a web-page.  Is this what you mean
> by JS-"able"?

Yes.  Although Sage, for now, does not make extensive use of either
project's  JS API, we could use them, e.g., to update the applets
dynamically, with results computed on the notebook server.

Jmol

http://jmol.sourceforge.net/jslibrary/

GeoGebra

http://www.geogebra.org/en/wiki/index.php/GeoGebra_JavaScript_Methods


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kstueve  
View profile  
 More options Nov 17 2009, 4:13 am
From: kstueve <kevin.stu...@gmail.com>
Date: Tue, 17 Nov 2009 01:13:51 -0800 (PST)
Local: Tues, Nov 17 2009 4:13 am
Subject: Re: Graphical Physics Program Suggestions
How can you edit a plot in real time programatically?  I have found
Ptplot useful in the past.  It allows points to be added to a plot,
zooming, etc.  Is there functionality like this in Sage?  Would Ptplot
make a good addition to Sage?  I would like some way to graph
quantities as they are changing (and being calculated), such as the
position or velocity of a body.
http://ptolemy.berkeley.edu/java/ptplot5.7/ptolemy/plot/doc/index.htm
Kevin Stueve

On Nov 15, 10:03 pm, Pat LeSmithe <qed...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 1 - 25 of 28   Newer >
« Back to Discussions « Newer topic     Older topic »