[kde-edu]: [RFC] KPhysics - Interactive physics experiments for KDE

Jason Harris kstars at 30doradus.org
Thu Apr 27 17:02:33 CEST 2006


Hello,

I think it's a great idea for an Edu app.  I actually have toyed with a 
similar idea myself, but I don't have time to maintain another KDE app, 
so I'm really glad to hear this proposal.  I even have some code laying 
around somewhere for a gravity simulator, which could possibly evolve 
into one of the KPhysics modules.

Jure Repinc wrote:
> So here are my plans for KPhysics.
> I would like to make it as modular as possible. For example there would
> be a framework with user interface. All the experiments would be in
> plug-ins (so that anyone could add/remove experiments as easily as
> possible). 
I think this is the right approach.  I wonder if (eventually) the 
experiment modules could be abstracted such that they are not even 
plugins, but simply machine-readable descriptions of the experimental 
setup (perhaps an XML file?).  This would really allow anyone to write 
new experiments, and we could just concentrate on making a flexible, 
robust physics engine, and maybe a GUI module editor.  What do you 
think?  Probably to start out, it will be easier to simply code 
experiments as actual classes in the program, but keep the modularity in 
mind when designing the class structure.

> Those experiment plug-ins would contain one experiment (in
> picture, interactive graphics (maybe even OpenGL), ... ) and commentary
> about it (in HTML). Each plug-om would also have some properties like
> what type of experiment it contains so that you can filter them from the
> user interface (disable OpenGL experiments automatically if no support
> is found on the system, show only experiments from certain filed of
> physics, only experiments for certain level of education system...).
> 
This metadata about the experiment modules is a good idea, and could be 
stored in the XML file (or whatever) that describes the module.  I think 
it's possible in Qt4 to seamlessly use OpenGL when it's available, and 
fall back to normal graphics calls when it isn't.

> How hard is it to make this framework/plug-ins structure?
> Keep in mind that I'm only a beginner C++/Qt/KDE programmer, but willing
> to learn a lot this summer. But I guess I would need quite a lot of help
> and answers from you guys and girls with much more experience.
> 
To begin, I would concentrate on the framework only.  You can hard-code 
a few generic experiments, just to give the framework something to "chew 
on", but early efforts should be more-or-less devoted to making a 
well-designed backend physics engine.  Just my $0.02.

> I was thinking about targeting KDE4, because I guess it will take a bit
> longer until this KPhysics is done and because I would like to learn how
> to program for KDE4, which will also run on Mac OS and Windows and the
> more people can use KPhysics the better
> 
Yes, this is very sensible.

> Is it that much harder to program for KDE4 then for KDE3. How fast are
> changes in API? Is there any history/changelog of API changes that is
> updated regularly and that I could easily follow?
> 
No, in fact, it's meant to be even easier :).  You'll have to throw away 
some KDE3 habits, but once you do, it's a brave new world.  It's true 
that kdelibs is still a moving target, but it's actually not too hard to 
  keep up with it.

> Would anyone be willing to be my mentor for the Google Summer of Code
> 2006? Is this even the right kind of the project for SoC?
> 
Hmm.  I really should say "sorry, I don't have time", but I really do 
not want to turn my back on this proposal.  So I will do it if no one 
else steps up :).  As for whether it's a good SoC project, my only 
concern would be the scope of the project.  It's probably not realistic 
to expect a fully-fledged KPhysics at the end of the summer, but maybe 
if you propose developing the physics engine framework as a 
proof-of-concept (perhaps with only some parts of it implemented, like 
simple mechanics, collisions, friction, gravity, springs, etc.), and 
then you can keep going with it after SoC is over.

Great idea!  Good luck,

Jason


More information about the kde-edu mailing list