Step is an interactive physics simulator. It works like this: you

place some bodies on the scene, add some forces such as gravity or
springs, then click "Simulate" and Step shows you how your scene
will evolve according to the laws of physics. You can change every
property of bodies/forces in your experiment (even during simulation)
and see how this will change the outcome of the experiment. With
Step you can not only learn but feel how physics works.
This commit is contained in:
zhuk 2013-04-24 19:06:28 +00:00
parent 84eede7cc6
commit dff83290d6
7 changed files with 262 additions and 0 deletions

26
x11/kde4/step/Makefile Normal file
View File

@ -0,0 +1,26 @@
# $OpenBSD: Makefile,v 1.1.1.1 2013/04/24 19:06:28 zhuk Exp $
COMMENT = KDE interactive physics simulator
DISTNAME = step-${MODKDE4_VERSION}
WANTLIB = c m pthread stdc++
WANTLIB += lib/qt4/QtDBus lib/qt4/QtGui lib/qt4/QtNetwork
WANTLIB += lib/qt4/QtOpenGL lib/qt4/QtSvg lib/qt4/QtXml
WANTLIB += ${KDE4LIB}/kdeui ${KDE4LIB}/khtml ${KDE4LIB}/kio ${KDE4LIB}/kjs
WANTLIB += ${KDE4LIB}/knewstuff3 ${KDE4LIB}/kparts ${KDE4LIB}/nepomuk
WANTLIB += ${KDE4LIB}/nepomukutils
WANTLIB += cln glib-2.0 gsl gslcblas iconv intl qalculate soprano xml2
MODULES = devel/gettext multimedia/phonon
BUILD_DEPENDS = math/eigen2
RUN_DEPENDS = devel/desktop-file-utils \
x11/gtk+2,-guic
LIB_DEPENDS = devel/gsl \
math/libqalculate
CONFIGURE_ARGS = -DSTEPCORE_TESTS:Bool=True
.include <bsd.port.mk>

2
x11/kde4/step/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (kde/step-4.10.2.tar.xz) = snQurKQCDFvvTPdJNdUMySDDoV0qSpJDxYVqnFFqXsU=
SIZE (kde/step-4.10.2.tar.xz) = 376340

View File

@ -0,0 +1,70 @@
$OpenBSD: patch-stepcore_tests_contacts_cc,v 1.1.1.1 2013/04/24 19:06:28 zhuk Exp $
--- stepcore_tests/contacts.cc.orig Tue Oct 11 05:47:23 2011
+++ stepcore_tests/contacts.cc Tue Oct 11 06:00:36 2011
@@ -15,12 +15,12 @@
along with StepCore; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <cmath>
+#include <stepcore/types.h>
#include "maintest.h"
#include <stepcore/collisionsolver.h>
#include <stepcore/rigidbody.h>
-#include <stepcore/types.h>
-#include <cmath>
class CollisionSolver: public StepCore::GJKCollisionSolver
{
@@ -67,7 +67,7 @@ void MainTest::testCollisionDetection_data()
QTest::newRow("vertex-edge-2")
<< vertexes << StepCore::Vector2d(0,0) << 0.0
<< vertexes << StepCore::Vector2d(3,0) << M_PI_4
- << int(StepCore::Contact::Separated) << StepCore::Vector2d(2-M_SQRT2,0);
+ << int(StepCore::Contact::Separated) << StepCore::Vector2d(2-M_SQRT2,0.);
QTest::newRow("edge-edge-1")
<< vertexes << StepCore::Vector2d(0,0) << 0.0
@@ -93,32 +93,32 @@ void MainTest::testCollisionDetection_data()
QTest::newRow("contact-vertex-edge-2")
<< vertexes << StepCore::Vector2d(0,0) << 0.0
- << vertexes << StepCore::Vector2d(1.001+M_SQRT2,0) << M_PI_4
- << int(StepCore::Contact::Contacted) << StepCore::Vector2d(0.001,0)
+ << vertexes << StepCore::Vector2d(1.001+M_SQRT2,0.) << M_PI_4
+ << int(StepCore::Contact::Contacted) << StepCore::Vector2d(0.001,0.)
<< 1 << StepCore::Vector2d(1,0);
QTest::newRow("contact-edge-edge-1")
<< vertexes << StepCore::Vector2d(0,0) << 0.0
- << vertexes << StepCore::Vector2d(2.001,0) << 0.0
- << int(StepCore::Contact::Contacted) << StepCore::Vector2d(0.001,0)
+ << vertexes << StepCore::Vector2d(2.001,0.) << 0.0
+ << int(StepCore::Contact::Contacted) << StepCore::Vector2d(0.001,0.)
<< 2 << StepCore::Vector2d(1,1) << StepCore::Vector2d(1,-1);
QTest::newRow("contact-edge-edge-2")
<< vertexes << StepCore::Vector2d(0,0) << 0.0
- << vertexes << StepCore::Vector2d(2.001,0) << 0.00001
- << int(StepCore::Contact::Contacted) << StepCore::Vector2d(0.00099,0)
+ << vertexes << StepCore::Vector2d(2.001,0.) << 0.00001
+ << int(StepCore::Contact::Contacted) << StepCore::Vector2d(0.00099,0.)
<< 2 << StepCore::Vector2d(1.000990,0.999990) << StepCore::Vector2d(1,-1);
QTest::newRow("contact-edge-edge-3")
<< vertexes << StepCore::Vector2d(0,0) << 0.0
- << vertexes << StepCore::Vector2d(2.001,1) << 0.0
- << int(StepCore::Contact::Contacted) << StepCore::Vector2d(0.001,0)
+ << vertexes << StepCore::Vector2d(2.001,1.) << 0.0
+ << int(StepCore::Contact::Contacted) << StepCore::Vector2d(0.001,0.)
<< 2 << StepCore::Vector2d(1,1) << StepCore::Vector2d(1,0);
QTest::newRow("contact-edge-edge-4")
<< vertexes << StepCore::Vector2d(0,0) << 0.0
- << vertexes << StepCore::Vector2d(2.001,1) << 0.00001
- << int(StepCore::Contact::Contacted) << (StepCore::Vector2d(1,1e-5)*9.999999e-04).eval()
+ << vertexes << StepCore::Vector2d(2.001,1.) << 0.00001
+ << int(StepCore::Contact::Contacted) << (StepCore::Vector2d(1.,1e-5)*9.999999e-04).eval()
<< 2 << StepCore::Vector2d(1,1) << StepCore::Vector2d(1.001010,-0.000010);
QTest::newRow("intersection-vertex-vertex-1")

View File

@ -0,0 +1,27 @@
$OpenBSD: patch-stepcore_tests_worldcopy_cc,v 1.1.1.1 2013/04/24 19:06:28 zhuk Exp $
[ 98%] Building CXX object stepcore_tests/CMakeFiles/tests.dir/worldcopy.o
cd /usr/ports/pobj/step-4.7.1/build-i386/stepcore_tests && /usr/bin/c++ -DSTEPCORE_WITH_QT -DSTEPCORE_WITH_GSL -DQT_TEST_LIB -DQT_CORE_LIB -DQT_NO_DEBUG -O2 -pipe -Woverloaded-v
irtual -fvisibility=hidden -Werror=return-type -fvisibility-inlines-hidden -O2 -DNDEBUG -DQT_NO_DEBUG -I/usr/ports/pobj/step-4.7.1/build-i386/stepcore_tests -I/usr/ports/pobj/step-4
.7.1/step-4.7.1/stepcore_tests -I/usr/ports/pobj/step-4.7.1/step-4.7.1 -I/usr/local/include/eigen2 -I/usr/local/include/X11/qt4 -I/usr/local/include/X11/qt4/QtTest -I/usr/local/incl
ude/X11/qt4/QtCore -Wall -o CMakeFiles/tests.dir/worldcopy.o -c /usr/ports/pobj/step-4.7.1/step-4.7.1/stepcore_tests/worldcopy.cc
In file included from /usr/ports/pobj/step-4.7.1/step-4.7.1/stepcore/types.h:28,
from /usr/ports/pobj/step-4.7.1/step-4.7.1/stepcore/world.h:26,
from /usr/ports/pobj/step-4.7.1/step-4.7.1/stepcore_tests/worldcopy.cc:20:
/usr/local/include/eigen2/Eigen/StdVector:9:2: error: #error you must include <Eigen/StdVector> before <vector>. Also note that <Eigen/Sparse> includes <vector>, so it must be inclu
ded after <Eigen/StdVector> too.
--- stepcore_tests/worldcopy.cc.orig Tue Oct 11 05:33:33 2011
+++ stepcore_tests/worldcopy.cc Tue Oct 11 05:48:02 2011
@@ -15,11 +15,11 @@
along with StepCore; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <stepcore/types.h>
#include "maintest.h"
#include <stepcore/world.h>
#include <stepcore/solver.h>
-#include <stepcore/types.h>
class WorldCopyTestItem: public StepCore::Item,
public StepCore::Body,

View File

@ -0,0 +1,28 @@
$OpenBSD: patch-stepcore_types_h,v 1.1.1.1 2013/04/24 19:06:28 zhuk Exp $
[ 98%] Building CXX object stepcore_tests/CMakeFiles/tests.dir/worldcopy.o
cd /usr/ports/pobj/step-4.7.1/build-i386/stepcore_tests && /usr/bin/c++ -DSTEPCORE_WITH_QT -DSTEPCORE_WITH_GSL -DQT_TEST_LIB -DQT_CORE_LIB -DQT_NO_DEBUG -O2 -pipe -Woverloaded-v
irtual -fvisibility=hidden -Werror=return-type -fvisibility-inlines-hidden -O2 -DNDEBUG -DQT_NO_DEBUG -I/usr/ports/pobj/step-4.7.1/build-i386/stepcore_tests -I/usr/ports/pobj/step-4
.7.1/step-4.7.1/stepcore_tests -I/usr/ports/pobj/step-4.7.1/step-4.7.1 -I/usr/local/include/eigen2 -I/usr/local/include/X11/qt4 -I/usr/local/include/X11/qt4/QtTest -I/usr/local/incl
ude/X11/qt4/QtCore -Wall -o CMakeFiles/tests.dir/worldcopy.o -c /usr/ports/pobj/step-4.7.1/step-4.7.1/stepcore_tests/worldcopy.cc
In file included from /usr/ports/pobj/step-4.7.1/step-4.7.1/stepcore/types.h:28,
from /usr/ports/pobj/step-4.7.1/step-4.7.1/stepcore/world.h:26,
from /usr/ports/pobj/step-4.7.1/step-4.7.1/stepcore_tests/worldcopy.cc:20:
/usr/local/include/eigen2/Eigen/StdVector:9:2: error: #error you must include <Eigen/StdVector> before <vector>. Also note that <Eigen/Sparse> includes <vector>, so it must be inclu
ded after <Eigen/StdVector> too.
--- stepcore/types.h.orig Tue Oct 11 05:35:52 2011
+++ stepcore/types.h Tue Oct 11 05:41:00 2011
@@ -23,11 +23,11 @@
#ifndef STEPCORE_TYPES_H
#define STEPCORE_TYPES_H
-#include "object.h"
-#include "vector.h"
#include <Eigen/StdVector>
-#include <QByteArray>
#include <Eigen/Sparse>
+#include <QByteArray>
+#include "object.h"
+#include "vector.h"
namespace StepCore {

7
x11/kde4/step/pkg/DESCR Normal file
View File

@ -0,0 +1,7 @@
Step is an interactive physics simulator. It works like this: you
place some bodies on the scene, add some forces such as gravity or
springs, then click "Simulate" and Step shows you how your scene
will evolve according to the laws of physics. You can change every
property of bodies/forces in your experiment (even during simulation)
and see how this will change the outcome of the experiment. With
Step you can not only learn but feel how physics works.

102
x11/kde4/step/pkg/PLIST Normal file
View File

@ -0,0 +1,102 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2013/04/24 19:06:28 zhuk Exp $
@bin bin/step
share/applications/kde4/step.desktop
share/apps/step/
share/apps/step/examples/
share/apps/step/examples/brownian.step
share/apps/step/examples/doublependulum.step
share/apps/step/examples/eightpendula.step
share/apps/step/examples/first.step
share/apps/step/examples/fourpendula.step
share/apps/step/examples/gas.step
share/apps/step/examples/graph.step
share/apps/step/examples/liquid.step
share/apps/step/examples/lissajous.step
share/apps/step/examples/motor.step
share/apps/step/examples/motor1.step
share/apps/step/examples/note.step
share/apps/step/examples/resonance.step
share/apps/step/examples/softbody.step
share/apps/step/examples/solar.step
share/apps/step/examples/springs.step
share/apps/step/examples/wave.step
share/apps/step/icons/
share/apps/step/icons/hicolor/
share/apps/step/icons/hicolor/22x22/
share/apps/step/icons/hicolor/22x22/actions/
share/apps/step/icons/hicolor/22x22/actions/pointer.png
share/apps/step/icons/hicolor/22x22/actions/step_object_Anchor.png
share/apps/step/icons/hicolor/22x22/actions/step_object_Box.png
share/apps/step/icons/hicolor/22x22/actions/step_object_ChargedParticle.png
share/apps/step/icons/hicolor/22x22/actions/step_object_CircularMotor.png
share/apps/step/icons/hicolor/22x22/actions/step_object_Controller.png
share/apps/step/icons/hicolor/22x22/actions/step_object_CoulombForce.png
share/apps/step/icons/hicolor/22x22/actions/step_object_Disk.png
share/apps/step/icons/hicolor/22x22/actions/step_object_Gas.png
share/apps/step/icons/hicolor/22x22/actions/step_object_GasParticle.png
share/apps/step/icons/hicolor/22x22/actions/step_object_Graph.png
share/apps/step/icons/hicolor/22x22/actions/step_object_GravitationForce.png
share/apps/step/icons/hicolor/22x22/actions/step_object_LinearMotor.png
share/apps/step/icons/hicolor/22x22/actions/step_object_Meter.png
share/apps/step/icons/hicolor/22x22/actions/step_object_Note.png
share/apps/step/icons/hicolor/22x22/actions/step_object_Particle.png
share/apps/step/icons/hicolor/22x22/actions/step_object_Pin.png
share/apps/step/icons/hicolor/22x22/actions/step_object_Polygon.png
share/apps/step/icons/hicolor/22x22/actions/step_object_Rope.png
share/apps/step/icons/hicolor/22x22/actions/step_object_SoftBody.png
share/apps/step/icons/hicolor/22x22/actions/step_object_Spring.png
share/apps/step/icons/hicolor/22x22/actions/step_object_Stick.png
share/apps/step/icons/hicolor/22x22/actions/step_object_Tracer.png
share/apps/step/icons/hicolor/22x22/actions/step_object_WeightForce.png
share/apps/step/objinfo/
share/apps/step/objinfo/Anchor.html
share/apps/step/objinfo/Box.html
share/apps/step/objinfo/ChargedParticle.html
share/apps/step/objinfo/CoulombForce.html
share/apps/step/objinfo/Disk.html
share/apps/step/objinfo/Gas.html
share/apps/step/objinfo/GasLJForce.html
share/apps/step/objinfo/GasParticle.html
share/apps/step/objinfo/GravitationForce.html
share/apps/step/objinfo/LinearMotor.html
share/apps/step/objinfo/Meter.html
share/apps/step/objinfo/Note.html
share/apps/step/objinfo/Particle.html
share/apps/step/objinfo/Pin.html
share/apps/step/objinfo/Polygon.html
share/apps/step/objinfo/Spring.html
share/apps/step/objinfo/WeightForce.html
share/apps/step/objinfo/World.html
share/apps/step/stepui.rc
share/apps/step/tutorials/
share/apps/step/tutorials/tutorial1.step
share/apps/step/tutorials/tutorial2.step
share/apps/step/tutorials/tutorial3.step
share/apps/step/tutorials/tutorial4.step
share/apps/step/tutorials/tutorial5.step
share/config.kcfg/step.kcfg
share/config/step.knsrc
share/doc/HTML/en/step/
share/doc/HTML/en/step/circular-motor.png
share/doc/HTML/en/step/common
share/doc/HTML/en/step/disk-properties.png
share/doc/HTML/en/step/examples.docbook
share/doc/HTML/en/step/index.cache.bz2
share/doc/HTML/en/step/index.docbook
share/doc/HTML/en/step/mainwindow.png
share/doc/HTML/en/step/tutorial1.png
share/doc/HTML/en/step/tutorial2.png
share/doc/HTML/en/step/tutorial3.png
share/doc/HTML/en/step/tutorial4.png
share/doc/HTML/en/step/tutorial5.png
share/doc/HTML/en/step/tutorials.docbook
share/icons/hicolor/128x128/apps/step.png
share/icons/hicolor/16x16/apps/step.png
share/icons/hicolor/22x22/apps/step.png
share/icons/hicolor/32x32/apps/step.png
share/icons/hicolor/48x48/apps/step.png
share/icons/hicolor/64x64/apps/step.png
@exec %D/bin/update-desktop-database
@unexec-delete %D/bin/update-desktop-database
@exec %D/bin/gtk-update-icon-cache -q -t %D/share/icons/hicolor
@unexec-delete %D/bin/gtk-update-icon-cache -q -t %D/share/icons/hicolor