You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
(1) |
Aug
|
Sep
(15) |
Oct
(32) |
Nov
(35) |
Dec
(48) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(46) |
Feb
(22) |
Mar
(65) |
Apr
(49) |
May
(22) |
Jun
(29) |
Jul
(51) |
Aug
(34) |
Sep
(32) |
Oct
(46) |
Nov
(30) |
Dec
(32) |
2002 |
Jan
(48) |
Feb
(4) |
Mar
(20) |
Apr
(28) |
May
(13) |
Jun
(34) |
Jul
(51) |
Aug
(15) |
Sep
(15) |
Oct
(35) |
Nov
(15) |
Dec
(20) |
2003 |
Jan
(31) |
Feb
(111) |
Mar
(41) |
Apr
(28) |
May
(36) |
Jun
(29) |
Jul
(27) |
Aug
(29) |
Sep
(47) |
Oct
(28) |
Nov
(7) |
Dec
(26) |
2004 |
Jan
(44) |
Feb
(9) |
Mar
(17) |
Apr
(26) |
May
(58) |
Jun
(13) |
Jul
(44) |
Aug
(64) |
Sep
(30) |
Oct
(11) |
Nov
(21) |
Dec
(28) |
2005 |
Jan
(29) |
Feb
(11) |
Mar
(11) |
Apr
(22) |
May
(85) |
Jun
(46) |
Jul
(17) |
Aug
(18) |
Sep
(14) |
Oct
(22) |
Nov
(1) |
Dec
(45) |
2006 |
Jan
(20) |
Feb
(36) |
Mar
(18) |
Apr
(24) |
May
(21) |
Jun
(48) |
Jul
(23) |
Aug
(20) |
Sep
(10) |
Oct
(41) |
Nov
(46) |
Dec
(40) |
2007 |
Jan
(40) |
Feb
(20) |
Mar
(13) |
Apr
(6) |
May
(24) |
Jun
(31) |
Jul
(30) |
Aug
(11) |
Sep
(11) |
Oct
(10) |
Nov
(56) |
Dec
(64) |
2008 |
Jan
(64) |
Feb
(22) |
Mar
(63) |
Apr
(28) |
May
(25) |
Jun
(36) |
Jul
(11) |
Aug
(9) |
Sep
(14) |
Oct
(41) |
Nov
(46) |
Dec
(130) |
2009 |
Jan
(95) |
Feb
(41) |
Mar
(24) |
Apr
(35) |
May
(53) |
Jun
(67) |
Jul
(48) |
Aug
(48) |
Sep
(86) |
Oct
(75) |
Nov
(64) |
Dec
(52) |
2010 |
Jan
(57) |
Feb
(31) |
Mar
(28) |
Apr
(40) |
May
(25) |
Jun
(42) |
Jul
(79) |
Aug
(31) |
Sep
(49) |
Oct
(66) |
Nov
(38) |
Dec
(25) |
2011 |
Jan
(29) |
Feb
(18) |
Mar
(44) |
Apr
(6) |
May
(28) |
Jun
(31) |
Jul
(36) |
Aug
(24) |
Sep
(30) |
Oct
(23) |
Nov
(21) |
Dec
(27) |
2012 |
Jan
(14) |
Feb
(11) |
Mar
(2) |
Apr
(48) |
May
(7) |
Jun
(32) |
Jul
(22) |
Aug
(25) |
Sep
(31) |
Oct
(32) |
Nov
(21) |
Dec
(17) |
2013 |
Jan
(44) |
Feb
(27) |
Mar
(3) |
Apr
(1) |
May
|
Jun
|
Jul
(3) |
Aug
(4) |
Sep
(1) |
Oct
(7) |
Nov
(5) |
Dec
(5) |
2014 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
(2) |
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
(7) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Robert X. <nne...@gm...> - 2009-08-12 22:31:41
|
When I was using VPython, I noticed that the level-of-detail for objects sometimes appears incorrect (in my application, I move the camera around, so this may exacerbate the problem). See http://img512.imageshack.us/img512/1860/ringlod.png for an example of this issue: the only difference between the two images is the direction that the camera is facing (the ring is positioned to be exactly in front of the camera). I found out that the implementation of frame::world_frame_transform() appears to be incorrect somehow, and so this is a patch which corrects it. =================================================================== --- frame.cpp +++ frame.cpp @@ -174,44 +174,9 @@ tmatrix frame::world_frame_transform() const { - // Performs a reorientation transform. - // ret = translation o reorientation - // ret = ireorientation o itranslation. + // This was previously incorrect, and has now been corrected by using the inverse of frame_world_transform. tmatrix ret; - - // A unit vector along the z_axis. - vector z_axis = vector(0,0,1); - if (std::fabs(axis.dot(up) / std::sqrt( up.mag2() * axis.mag2())) > 0.98) { - if (std::fabs(axis.norm().dot( vector(-1,0,0))) > 0.98) - z_axis = axis.cross( vector(0,0,1)).norm(); - else - z_axis = axis.cross( vector(-1,0,0)).norm(); - } - else { - z_axis = axis.cross( up).norm(); - } - - vector y_axis = z_axis.cross(axis).norm(); - vector x_axis = axis.norm(); - /* - x_axis /= scale.x; - y_axis /= scale.y; - z_axis /= scale.z; - */ - - ret(0,0) = x_axis.x; - ret(0,1) = x_axis.y; - ret(0,2) = x_axis.z; - ret(0,3) = (pos * x_axis).sum(); - ret(1,0) = y_axis.x; - ret(1,1) = y_axis.y; - ret(1,2) = y_axis.z; - ret(1,3) = (pos * y_axis).sum(); - ret(2,0) = z_axis.x; - ret(2,1) = z_axis.y; - ret(2,2) = z_axis.z; - ret(2,3) = (pos * z_axis).sum(); - + inverse(ret, frame_world_transform(1.0)); return ret; } Now, the ring appears correct at all scale levels, and appears to be correctly degraded when zoomed out. Robert |
From: Bruce S. <Bru...@nc...> - 2009-08-12 21:54:20
|
I'll comment that one just gets a standard error message, not a segfault, on Ubuntu, Windows, and Mac. Bruce Sherwood Sanjoy Mahajan wrote: > On Debian GNU/Linux (i386, 'unstable' distribution), I get a segfault > with the following vpython script. I'm using v5.11 as packaged in > Debian, with Python 2.5.4 from Debian. > > Does anyone see the same problem? > > I eventually figured out one problem with the script: the "F -= > ball.m*g" line needs a vector on the right-hand side. But I don't think > it should segfault even with that mistake. > > By the way, valgrind is not very happy with the script, and also gives > something of a backtrace for the segfault. I've included the end of the > output of "valgrind --leak-check=full python /tmp/script.py" > > -Sanjoy > > > from visual import * > > cd = 0.5 # drag coefficient for a sphere > ball = sphere(pos=(0,0,0), # in m > color=color.red, > radius=0.05) # in m > ball.v = vector(10,0,10) # in m/s > ball.m = 0.5 > g = 10 > endpoint = sphere(pos=(20,0,0)) > startpoint = sphere(pos=(0,0,0)) > scene.autoscale = 0 > > trail = curve() > dt = 0.0001 > area = pi * ball.radius**2 # cross-sectional area of ball > while 1: > rate(int(1/dt)) > ball.pos += ball.v*dt # use updated velocity to update position > trail.append(pos=ball.pos) > F = -0.5 * cd * area * ball.v * ball.v.mag > F -= ball.m*g > ball.v += F/ball.m*dt # force changes the velocity > > > And here is the valgrind output: > > > > |
From: Robert X. <nne...@gm...> - 2009-08-12 21:53:37
|
I wrote a small frame wrapper class to add these sorts of transformations in a program I developed: class Frame(frame): def world_axes(self): x_axis = norm(self.axis) z_axis = norm(self.axis.cross(self.up)) y_axis = norm(z_axis.cross(x_axis)) return (x_axis, y_axis, z_axis) def world_offset(self, pos): x,y,z = self.world_axes() return pos.x*x + pos.y*y + pos.z*z def world_pos(self, pos): return self.pos + self.world_offset(pos) def frame_offset(self, pos): x,y,z = self.world_axes() return vector(pos.dot(x), pos.dot(y), pos.dot(z)) def frame_pos(self, pos): return self.frame_offset(pos - self.pos) world_pos is the frame->world transformation; frame_pos is the world->frame transformation. Robert |
From: Sanjoy M. <sa...@MI...> - 2009-08-12 19:31:50
|
On Debian GNU/Linux (i386, 'unstable' distribution), I get a segfault with the following vpython script. I'm using v5.11 as packaged in Debian, with Python 2.5.4 from Debian. Does anyone see the same problem? I eventually figured out one problem with the script: the "F -= ball.m*g" line needs a vector on the right-hand side. But I don't think it should segfault even with that mistake. By the way, valgrind is not very happy with the script, and also gives something of a backtrace for the segfault. I've included the end of the output of "valgrind --leak-check=full python /tmp/script.py" -Sanjoy from visual import * cd = 0.5 # drag coefficient for a sphere ball = sphere(pos=(0,0,0), # in m color=color.red, radius=0.05) # in m ball.v = vector(10,0,10) # in m/s ball.m = 0.5 g = 10 endpoint = sphere(pos=(20,0,0)) startpoint = sphere(pos=(0,0,0)) scene.autoscale = 0 trail = curve() dt = 0.0001 area = pi * ball.radius**2 # cross-sectional area of ball while 1: rate(int(1/dt)) ball.pos += ball.v*dt # use updated velocity to update position trail.append(pos=ball.pos) F = -0.5 * cd * area * ball.v * ball.v.mag F -= ball.m*g ball.v += F/ball.m*dt # force changes the velocity And here is the valgrind output: ==3275== Memcheck, a memory error detector. ==3275== Copyright (C) 2002-2008, and GNU GPL'd, by Julian Seward et al. ==3275== Using LibVEX rev 1884, a library for dynamic binary translation. ==3275== Copyright (C) 2004-2008, and GNU GPL'd, by OpenWorks LLP. ==3275== Using valgrind-3.4.1-Debian, a dynamic binary instrumentation framework. ==3275== Copyright (C) 2000-2008, and GNU GPL'd, by Julian Seward et al. ==3275== For more details, rerun with: -v ........... snipped a bunch of stuff here .................. ==3275== Thread 2: ==3275== Conditional jump or move depends on uninitialised value(s) ==3275== at 0x9239325: _mesa_LightModelfv (in /usr/lib/dri/i915_dri.so) ==3275== by 0x5DC2219: cvisual::display_kernel::enable_lights(cvisual::view&) (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x5DC5AF9: cvisual::display_kernel::draw(cvisual::view&, int, bool, bool) (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x5DC8B85: cvisual::display_kernel::render_scene() (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x5DECC7E: cvisual::render_surface::paint(Gtk::Window*, bool, bool) (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x5DE4A00: cvisual::display::paint() (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x5DB0E75: cvisual::render_manager::paint_displays(std::vector<cvisual::display*, std::allocator<cvisual::display*> > const&, bool) (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x5DE477D: cvisual::gui_main::poll() (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x5DE981B: sigc::internal::slot_call0<sigc::bound_mem_functor0<bool, cvisual::gui_main>, bool>::call_it(sigc::internal::slot_rep*) (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x6704BE4: (within /usr/lib/libglibmm-2.4.so.1.2.0) ==3275== by 0x6F6BA25: (within /usr/lib/libglib-2.0.so.0.2000.4) ==3275== by 0x6F6B367: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.2000.4) ==3275== ==3275== Thread 1: ==3275== Invalid read of size 4 ==3275== at 0x710E967: __cxa_allocate_exception (in /usr/lib/libstdc++.so.6.0.12) ==3275== by 0x7017F9D: boost::python::throw_error_already_set() (in /usr/lib/libboost_python-mt-py25.so.1.38.0) ==3275== by 0x700FD19: boost::python::objects::function::argument_error(_object*, _object*) const (in /usr/lib/libboost_python-mt-py25.so.1.38.0) ==3275== by 0x701023B: boost::python::objects::function::call(_object*, _object*) const (in /usr/lib/libboost_python-mt-py25.so.1.38.0) ==3275== by 0x7010456: (within /usr/lib/libboost_python-mt-py25.so.1.38.0) ==3275== by 0x5DAECFB: boost::function0<void>::operator()() const (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x701802A: boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const (in /usr/lib/libboost_python-mt-py25.so.1.38.0) ==3275== by 0x5DF9221: boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<std::runtime_error, void (*)(std::runtime_error)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void (*)(std::runtime_error)> > >, bool, boost::python::detail::exception_handler const&, boost::function0<void> const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0<void> const&) (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x701800D: boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const (in /usr/lib/libboost_python-mt-py25.so.1.38.0) ==3275== by 0x5DF8F91: boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<std::invalid_argument, void (*)(std::invalid_argument)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void (*)(std::invalid_argument)> > >, bool, boost::python::detail::exception_handler const&, boost::function0<void> const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0<void> const&) (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x701800D: boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const (in /usr/lib/libboost_python-mt-py25.so.1.38.0) ==3275== by 0x5DF8EE1: boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<std::out_of_range, void (*)(std::out_of_range)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void (*)(std::out_of_range)> > >, bool, boost::python::detail::exception_handler const&, boost::function0<void> const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0<void> const&) (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== Address 0xc is not stack'd, malloc'd or (recently) free'd ==3275== ==3275== Process terminating with default action of signal 11 (SIGSEGV) ==3275== Access not within mapped region at address 0xC ==3275== at 0x710E967: __cxa_allocate_exception (in /usr/lib/libstdc++.so.6.0.12) ==3275== by 0x7017F9D: boost::python::throw_error_already_set() (in /usr/lib/libboost_python-mt-py25.so.1.38.0) ==3275== by 0x700FD19: boost::python::objects::function::argument_error(_object*, _object*) const (in /usr/lib/libboost_python-mt-py25.so.1.38.0) ==3275== by 0x701023B: boost::python::objects::function::call(_object*, _object*) const (in /usr/lib/libboost_python-mt-py25.so.1.38.0) ==3275== by 0x7010456: (within /usr/lib/libboost_python-mt-py25.so.1.38.0) ==3275== by 0x5DAECFB: boost::function0<void>::operator()() const (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x701802A: boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const (in /usr/lib/libboost_python-mt-py25.so.1.38.0) ==3275== by 0x5DF9221: boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<std::runtime_error, void (*)(std::runtime_error)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void (*)(std::runtime_error)> > >, bool, boost::python::detail::exception_handler const&, boost::function0<void> const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0<void> const&) (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x701800D: boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const (in /usr/lib/libboost_python-mt-py25.so.1.38.0) ==3275== by 0x5DF8F91: boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<std::invalid_argument, void (*)(std::invalid_argument)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void (*)(std::invalid_argument)> > >, bool, boost::python::detail::exception_handler const&, boost::function0<void> const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0<void> const&) (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x701800D: boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const (in /usr/lib/libboost_python-mt-py25.so.1.38.0) ==3275== by 0x5DF8EE1: boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<std::out_of_range, void (*)(std::out_of_range)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void (*)(std::out_of_range)> > >, bool, boost::python::detail::exception_handler const&, boost::function0<void> const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0<void> const&) (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== If you believe this happened as a result of a stack overflow in your ==3275== program's main thread (unlikely but possible), you can try to increase ==3275== the size of the main thread stack using the --main-stacksize= flag. ==3275== The main thread stack size used in this run was 8388608. ==3275== ==3275== ERROR SUMMARY: 747 errors from 61 contexts (suppressed: 729 from 6) ==3275== malloc/free: in use at exit: 17,259,192 bytes in 13,131 blocks. ==3275== malloc/free: 28,721 allocs, 15,590 frees, 35,738,068 bytes allocated. ==3275== For counts of detected errors, rerun with: -v ==3275== Use --track-origins=yes to see where uninitialised values come from ==3275== searching for pointers to 13,131 not-freed blocks. ==3275== checked 31,834,460 bytes. ==3275== ==3275== ==3275== 24 bytes in 1 blocks are possibly lost in loss record 304 of 593 ==3275== at 0x4025A2E: operator new(unsigned int) (vg_replace_malloc.c:224) ==3275== by 0x64E2D25: Gdk::Window_Class::wrap_new(_GObject*) (in /usr/lib/libgdkmm-2.4.so.1.0.30) ==3275== by 0x67134F2: (within /usr/lib/libglibmm-2.4.so.1.2.0) ==3275== by 0x67135A7: Glib::wrap_auto(_GObject*, bool) (in /usr/lib/libglibmm-2.4.so.1.2.0) ==3275== by 0x64E2F9C: Glib::wrap(_GdkWindowObject*, bool) (in /usr/lib/libgdkmm-2.4.so.1.0.30) ==3275== by 0x63402F4: Gtk::Widget::get_parent_window() (in /usr/lib/libgtkmm-2.4.so.1.0.30) ==3275== by 0x5DEC890: cvisual::render_surface::on_configure_event(_GdkEventConfigure*) (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x6341E12: Gtk::Widget_Class::configure_event_callback(_GtkWidget*, _GdkEventConfigure*) (in /usr/lib/libgtkmm-2.4.so.1.0.30) ==3275== by 0x6861AE5: (within /usr/lib/libgtk-x11-2.0.so.0.1600.5) ==3275== by 0x6E60298: (within /usr/lib/libgobject-2.0.so.0.2000.4) ==3275== by 0x6E61B12: g_closure_invoke (in /usr/lib/libgobject-2.0.so.0.2000.4) ==3275== by 0x6E757E6: (within /usr/lib/libgobject-2.0.so.0.2000.4) ==3275== ==3275== ==3275== 24 bytes in 1 blocks are possibly lost in loss record 306 of 593 ==3275== at 0x4025A2E: operator new(unsigned int) (vg_replace_malloc.c:224) ==3275== by 0x5F1BD95: Gdk::GL::Config_Class::wrap_new(_GObject*) (in /usr/lib/libgdkglextmm-x11-1.2.so.0.0.0) ==3275== by 0x67134F2: (within /usr/lib/libglibmm-2.4.so.1.2.0) ==3275== by 0x67135A7: Glib::wrap_auto(_GObject*, bool) (in /usr/lib/libglibmm-2.4.so.1.2.0) ==3275== by 0x5F1BEBC: Glib::wrap(_GdkGLConfig*, bool) (in /usr/lib/libgdkglextmm-x11-1.2.so.0.0.0) ==3275== by 0x5F1C178: Gdk::GL::Config::create(Gdk::GL::ConfigMode) (in /usr/lib/libgdkglextmm-x11-1.2.so.0.0.0) ==3275== by 0x5DED3F2: cvisual::render_surface::render_surface(cvisual::display_kernel&, cvisual::mouse_manager&, bool) (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x5DE57B3: cvisual::display::create() (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x5DE91E0: cvisual::gui_main::add_display_impl() (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x5DE97DB: sigc::internal::slot_call0<sigc::bound_mem_functor0<void, cvisual::gui_main>, void>::call_it(sigc::internal::slot_rep*) (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x6702A48: Glib::DispatchNotifier::pipe_io_handler(Glib::IOCondition) (in /usr/lib/libglibmm-2.4.so.1.2.0) ==3275== by 0x6702B84: sigc::internal::slot_call1<sigc::bound_mem_functor1<bool, Glib::DispatchNotifier, Glib::IOCondition>, bool, Glib::IOCondition>::call_it(sigc::internal::slot_rep*, Glib::IOCondition const&) (in /usr/lib/libglibmm-2.4.so.1.2.0) ==3275== ==3275== ==3275== 40 bytes in 1 blocks are possibly lost in loss record 360 of 593 ==3275== at 0x4025A2E: operator new(unsigned int) (vg_replace_malloc.c:224) ==3275== by 0x626A475: Gtk::VBox_Class::wrap_new(_GObject*) (in /usr/lib/libgtkmm-2.4.so.1.0.30) ==3275== by 0x67134F2: (within /usr/lib/libglibmm-2.4.so.1.2.0) ==3275== by 0x67135A7: Glib::wrap_auto(_GObject*, bool) (in /usr/lib/libglibmm-2.4.so.1.2.0) ==3275== by 0x6343B64: Glib::wrap(_GtkWidget*, bool) (in /usr/lib/libgtkmm-2.4.so.1.0.30) ==3275== by 0x60E1859: Gnome::Glade::Xml::get_widget(Glib::ustring const&) (in /usr/lib/libglademm-2.4.so.1.0.5) ==3275== by 0x5DE6675: cvisual::display::create() (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x5DE91E0: cvisual::gui_main::add_display_impl() (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x5DE97DB: sigc::internal::slot_call0<sigc::bound_mem_functor0<void, cvisual::gui_main>, void>::call_it(sigc::internal::slot_rep*) (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x6702A48: Glib::DispatchNotifier::pipe_io_handler(Glib::IOCondition) (in /usr/lib/libglibmm-2.4.so.1.2.0) ==3275== by 0x6702B84: sigc::internal::slot_call1<sigc::bound_mem_functor1<bool, Glib::DispatchNotifier, Glib::IOCondition>, bool, Glib::IOCondition>::call_it(sigc::internal::slot_rep*, Glib::IOCondition const&) (in /usr/lib/libglibmm-2.4.so.1.2.0) ==3275== by 0x67048D1: Glib::IOSource::dispatch(sigc::slot_base*) (in /usr/lib/libglibmm-2.4.so.1.2.0) ==3275== ==3275== ==3275== 100 bytes in 1 blocks are definitely lost in loss record 430 of 593 ==3275== at 0x402601E: malloc (vg_replace_malloc.c:207) ==3275== by 0x710E954: __cxa_allocate_exception (in /usr/lib/libstdc++.so.6.0.12) ==3275== by 0x7017F9D: boost::python::throw_error_already_set() (in /usr/lib/libboost_python-mt-py25.so.1.38.0) ==3275== by 0x700FD19: boost::python::objects::function::argument_error(_object*, _object*) const (in /usr/lib/libboost_python-mt-py25.so.1.38.0) ==3275== by 0x701023B: boost::python::objects::function::call(_object*, _object*) const (in /usr/lib/libboost_python-mt-py25.so.1.38.0) ==3275== by 0x7010456: (within /usr/lib/libboost_python-mt-py25.so.1.38.0) ==3275== by 0x5DAECFB: boost::function0<void>::operator()() const (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x701802A: boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const (in /usr/lib/libboost_python-mt-py25.so.1.38.0) ==3275== by 0x5DF9221: boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<std::runtime_error, void (*)(std::runtime_error)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void (*)(std::runtime_error)> > >, bool, boost::python::detail::exception_handler const&, boost::function0<void> const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0<void> const&) (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x701800D: boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const (in /usr/lib/libboost_python-mt-py25.so.1.38.0) ==3275== by 0x5DF8F91: boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<std::invalid_argument, void (*)(std::invalid_argument)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void (*)(std::invalid_argument)> > >, bool, boost::python::detail::exception_handler const&, boost::function0<void> const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0<void> const&) (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x701800D: boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const (in /usr/lib/libboost_python-mt-py25.so.1.38.0) ==3275== ==3275== ==3275== 160 (40 direct, 120 indirect) bytes in 1 blocks are definitely lost in loss record 454 of 593 ==3275== at 0x402601E: malloc (vg_replace_malloc.c:207) ==3275== by 0x417FA68: (within /lib/i686/cmov/libc-2.9.so) ==3275== by 0x4180325: __nss_database_lookup (in /lib/i686/cmov/libc-2.9.so) ==3275== by 0x7F08F2B: ??? ==3275== by 0x7F09C84: ??? ==3275== by 0x4127711: getpwnam_r (in /lib/i686/cmov/libc-2.9.so) ==3275== by 0x6F9F9D3: (within /usr/lib/libglib-2.0.so.0.2000.4) ==3275== by 0x6FA1454: g_get_home_dir (in /usr/lib/libglib-2.0.so.0.2000.4) ==3275== by 0x68A90F7: (within /usr/lib/libgtk-x11-2.0.so.0.1600.5) ==3275== by 0x68ABC2A: (within /usr/lib/libgtk-x11-2.0.so.0.1600.5) ==3275== by 0x685C67E: (within /usr/lib/libgtk-x11-2.0.so.0.1600.5) ==3275== by 0x6F7A244: g_option_context_parse (in /usr/lib/libglib-2.0.so.0.2000.4) ==3275== ==3275== ==3275== 168 bytes in 1 blocks are possibly lost in loss record 466 of 593 ==3275== at 0x40240D2: calloc (vg_replace_malloc.c:397) ==3275== by 0x401119B: _dl_allocate_tls (in /lib/ld-2.9.so) ==3275== by 0x4047652: pthread_create@@GLIBC_2.1 (in /lib/i686/cmov/libpthread-2.9.so) ==3275== by 0x703A30E: boost::thread::start_thread() (in /usr/lib/libboost_thread-mt.so.1.38.0) ==3275== by 0x5DE5054: cvisual::gui_main::init_thread() (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x5DE7B38: cvisual::gui_main::add_display(cvisual::display*) (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x5DE7EFC: cvisual::display::activate(bool) (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x5DC3855: cvisual::display_kernel::set_visible(bool) (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x5DC3ECF: cvisual::display_kernel::implicit_activate() (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x5DC401B: cvisual::display_kernel::add_renderable(boost::shared_ptr<cvisual::renderable>) (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x5E51D18: boost::python::objects::caller_py_function_impl<boost::python::detail::caller<void (cvisual::display_kernel::*)(boost::shared_ptr<cvisual::renderable>), boost::python::default_call_policies, boost::mpl::vector3<void, cvisual::display_kernel&, boost::shared_ptr<cvisual::renderable> > > >::operator()(_object*, _object*) (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x70101CF: boost::python::objects::function::call(_object*, _object*) const (in /usr/lib/libboost_python-mt-py25.so.1.38.0) ==3275== ==3275== ==3275== 200 bytes in 2 blocks are possibly lost in loss record 471 of 593 ==3275== at 0x40240D2: calloc (vg_replace_malloc.c:397) ==3275== by 0x7F4CB3F: (within /usr/lib/libdrm_intel.so.1.0.0) ==3275== by 0x7F48462: drm_intel_bo_alloc (in /usr/lib/libdrm_intel.so.1.0.0) ==3275== by 0x91E6954: intel_get_prim_space (in /usr/lib/dri/i915_dri.so) ==3275== by 0x91EC6DB: (within /usr/lib/dri/i915_dri.so) ==3275== by 0x91F2063: (within /usr/lib/dri/i915_dri.so) ==3275== by 0x92945C7: (within /usr/lib/dri/i915_dri.so) ==3275== by 0x928A3C3: _tnl_run_pipeline (in /usr/lib/dri/i915_dri.so) ==3275== by 0x91DDA88: (within /usr/lib/dri/i915_dri.so) ==3275== by 0x928A9D4: _tnl_draw_prims (in /usr/lib/dri/i915_dri.so) ==3275== by 0x928979B: vbo_save_playback_vertex_list (in /usr/lib/dri/i915_dri.so) ==3275== by 0x921375E: (within /usr/lib/dri/i915_dri.so) ==3275== ==3275== ==3275== 432 bytes in 1 blocks are possibly lost in loss record 482 of 593 ==3275== at 0x402613C: realloc (vg_replace_malloc.c:429) ==3275== by 0x80F7B78: _PyObject_GC_Resize (in /usr/bin/python2.5) ==3275== by 0x811626B: PyFrame_New (in /usr/bin/python2.5) ==3275== by 0x80CF84D: PyEval_EvalFrameEx (in /usr/bin/python2.5) ==3275== by 0x80CF89C: PyEval_EvalFrameEx (in /usr/bin/python2.5) ==3275== by 0x80CF89C: PyEval_EvalFrameEx (in /usr/bin/python2.5) ==3275== by 0x80CF89C: PyEval_EvalFrameEx (in /usr/bin/python2.5) ==3275== by 0x80D00C4: PyEval_EvalCodeEx (in /usr/bin/python2.5) ==3275== by 0x80CE9FB: PyEval_EvalFrameEx (in /usr/bin/python2.5) ==3275== by 0x80D00C4: PyEval_EvalCodeEx (in /usr/bin/python2.5) ==3275== by 0x80CE9FB: PyEval_EvalFrameEx (in /usr/bin/python2.5) ==3275== by 0x80D00C4: PyEval_EvalCodeEx (in /usr/bin/python2.5) ==3275== ==3275== ==3275== 800 bytes in 20 blocks are possibly lost in loss record 495 of 593 ==3275== at 0x40240D2: calloc (vg_replace_malloc.c:397) ==3275== by 0x6F7387B: g_malloc0 (in /usr/lib/libglib-2.0.so.0.2000.4) ==3275== by 0x6E7AA2B: (within /usr/lib/libgobject-2.0.so.0.2000.4) ==3275== by 0x6E7AAA5: (within /usr/lib/libgobject-2.0.so.0.2000.4) ==3275== by 0x6E7D0D7: g_type_init_with_debug_flags (in /usr/lib/libgobject-2.0.so.0.2000.4) ==3275== by 0x6E7D251: g_type_init (in /usr/lib/libgobject-2.0.so.0.2000.4) ==3275== by 0x6C26CD2: gdk_pre_parse_libgtk_only (in /usr/lib/libgdk-x11-2.0.so.0.1600.5) ==3275== by 0x685C816: (within /usr/lib/libgtk-x11-2.0.so.0.1600.5) ==3275== by 0x6F79D2C: g_option_context_parse (in /usr/lib/libglib-2.0.so.0.2000.4) ==3275== by 0x685C311: gtk_parse_args (in /usr/lib/libgtk-x11-2.0.so.0.1600.5) ==3275== by 0x685C393: gtk_init_check (in /usr/lib/libgtk-x11-2.0.so.0.1600.5) ==3275== by 0x685C3D3: gtk_init (in /usr/lib/libgtk-x11-2.0.so.0.1600.5) ==3275== ==3275== ==3275== 3,524 (196 direct, 3,328 indirect) bytes in 1 blocks are definitely lost in loss record 523 of 593 ==3275== at 0x402601E: malloc (vg_replace_malloc.c:207) ==3275== by 0x923725C: _mesa_malloc (in /usr/lib/dri/i915_dri.so) ==3275== by 0x918FB53: driConcatConfigs (in /usr/lib/dri/i915_dri.so) ==3275== by 0x91C0A67: (within /usr/lib/dri/i915_dri.so) ==3275== by 0x91919BA: (within /usr/lib/dri/i915_dri.so) ==3275== by 0x6025AB4: (within /usr/lib/libGL.so.1.2) ==3275== by 0x6002ADD: (within /usr/lib/libGL.so.1.2) ==3275== by 0x5FFE359: (within /usr/lib/libGL.so.1.2) ==3275== by 0x5FFF0C5: glXChooseVisual (in /usr/lib/libGL.so.1.2) ==3275== by 0x5F676FE: (within /usr/lib/libgdkglext-x11-1.0.so.0.0.0) ==3275== by 0x5F465D8: (within /usr/lib/libgdkglext-x11-1.0.so.0.0.0) ==3275== by 0x5F46724: (within /usr/lib/libgdkglext-x11-1.0.so.0.0.0) ==3275== ==3275== ==3275== 49,487 bytes in 50 blocks are possibly lost in loss record 576 of 593 ==3275== at 0x402601E: malloc (vg_replace_malloc.c:207) ==3275== by 0x8095413: PyString_FromStringAndSize (in /usr/bin/python2.5) ==3275== by 0x80E8744: (within /usr/bin/python2.5) ==3275== by 0x80E88DC: (within /usr/bin/python2.5) ==3275== by 0x80E8A26: (within /usr/bin/python2.5) ==3275== by 0x80E9478: PyMarshal_ReadLastObjectFromFile (in /usr/bin/python2.5) ==3275== by 0x80E38C2: (within /usr/bin/python2.5) ==3275== by 0x80E4CD6: (within /usr/bin/python2.5) ==3275== by 0x80E4F69: (within /usr/bin/python2.5) ==3275== by 0x80E553B: (within /usr/bin/python2.5) ==3275== by 0x80E5891: PyImport_ImportModuleLevel (in /usr/bin/python2.5) ==3275== by 0x80C8423: (within /usr/bin/python2.5) ==3275== ==3275== ==3275== 50,388 bytes in 139 blocks are possibly lost in loss record 578 of 593 ==3275== at 0x402601E: malloc (vg_replace_malloc.c:207) ==3275== by 0x80F8DCA: _PyObject_GC_NewVar (in /usr/bin/python2.5) ==3275== by 0x81162A7: PyFrame_New (in /usr/bin/python2.5) ==3275== by 0x80CF84D: PyEval_EvalFrameEx (in /usr/bin/python2.5) ==3275== by 0x80D00C4: PyEval_EvalCodeEx (in /usr/bin/python2.5) ==3275== by 0x80CE9FB: PyEval_EvalFrameEx (in /usr/bin/python2.5) ==3275== by 0x80D00C4: PyEval_EvalCodeEx (in /usr/bin/python2.5) ==3275== by 0x80D02D6: PyEval_EvalCode (in /usr/bin/python2.5) ==3275== by 0x80E3528: PyImport_ExecCodeModuleEx (in /usr/bin/python2.5) ==3275== by 0x80E37EB: (within /usr/bin/python2.5) ==3275== by 0x80E4CD6: (within /usr/bin/python2.5) ==3275== by 0x80E4F69: (within /usr/bin/python2.5) ==3275== ==3275== ==3275== 58,946 bytes in 218 blocks are possibly lost in loss record 579 of 593 ==3275== at 0x4025A2E: operator new(unsigned int) (vg_replace_malloc.c:224) ==3275== by 0x70EC145: std::string::_Rep::_S_create(unsigned int, unsigned int, std::allocator<char> const&) (in /usr/lib/libstdc++.so.6.0.12) ==3275== by 0x70ED050: (within /usr/lib/libstdc++.so.6.0.12) ==3275== by 0x70ED235: std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) (in /usr/lib/libstdc++.so.6.0.12) ==3275== by 0x5DC361F: cvisual::display_kernel::display_kernel() (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x5DE4A44: cvisual::display::display() (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x5E51358: boost::python::objects::make_holder<0>::apply<boost::python::objects::value_holder<cvisual::display>, boost::mpl::vector0<mpl_::na> >::execute(_object*) (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x5E09940: boost::python::objects::caller_py_function_impl<boost::python::detail::caller<void (*)(_object*), boost::python::default_call_policies, boost::mpl::vector2<void, _object*> > >::operator()(_object*, _object*) (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x70101CF: boost::python::objects::function::call(_object*, _object*) const (in /usr/lib/libboost_python-mt-py25.so.1.38.0) ==3275== by 0x7010456: (within /usr/lib/libboost_python-mt-py25.so.1.38.0) ==3275== by 0x5DAECFB: boost::function0<void>::operator()() const (in /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0) ==3275== by 0x701802A: boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const (in /usr/lib/libboost_python-mt-py25.so.1.38.0) ==3275== ==3275== ==3275== 60,232 bytes in 55 blocks are possibly lost in loss record 580 of 593 ==3275== at 0x4023F3A: memalign (vg_replace_malloc.c:460) ==3275== by 0x4023FEE: posix_memalign (vg_replace_malloc.c:569) ==3275== by 0x6F88BAE: (within /usr/lib/libglib-2.0.so.0.2000.4) ==3275== by 0x6F8A32B: g_slice_alloc (in /usr/lib/libglib-2.0.so.0.2000.4) ==3275== by 0x6F8A464: g_slice_alloc0 (in /usr/lib/libglib-2.0.so.0.2000.4) ==3275== by 0x6E823EA: g_type_create_instance (in /usr/lib/libgobject-2.0.so.0.2000.4) ==3275== by 0x6E67264: (within /usr/lib/libgobject-2.0.so.0.2000.4) ==3275== by 0x6E67A95: g_object_newv (in /usr/lib/libgobject-2.0.so.0.2000.4) ==3275== by 0x6E68655: g_object_new_valist (in /usr/lib/libgobject-2.0.so.0.2000.4) ==3275== by 0x6E687CD: g_object_new (in /usr/lib/libgobject-2.0.so.0.2000.4) ==3275== by 0x6C4DA27: gdk_display_open (in /usr/lib/libgdk-x11-2.0.so.0.1600.5) ==3275== by 0x6C26B94: gdk_display_open_default_libgtk_only (in /usr/lib/libgdk-x11-2.0.so.0.1600.5) ==3275== ==3275== LEAK SUMMARY: ==3275== definitely lost: 336 bytes in 3 blocks. ==3275== indirectly lost: 3,448 bytes in 26 blocks. ==3275== possibly lost: 220,741 bytes in 489 blocks. ==3275== still reachable: 17,034,667 bytes in 12,613 blocks. ==3275== suppressed: 0 bytes in 0 blocks. ==3275== Reachable blocks (those to which a pointer was found) are not shown. ==3275== To see them, rerun with: --leak-check=full --show-reachable=yes |
From: Cross, J. <JC...@CS...> - 2009-08-10 19:49:29
|
It took me a while to get a 64bit build of vpython for Fedora 11, so I thought I'd share what I have: http://www.users.csbsju.edu/~jcross/vpython/ Jason Cross IT Services College of St. Benedict - St. John's University |
From: Tony R. <To...@br...> - 2009-08-07 02:59:52
|
ubuntu package segfaults in python2.5/2.6 i modified the debian package to allow python2.6... segfaults in 2.6 but works perfectly on 2.5 in Karmic. Python 2.6.2+ (release26-maint, Jul 24 2009, 16:16:12) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import cvisual Segmentation fault (core dumped) looks like the reason it keeps failing is that the default python in the upcoming Ubuntu release is python2.6 and per this link: http://vpython.wikidot.com/forum/t-97105 there is still some issues with 2.6 and vpython? or is that solved and the package just needs to be rebuilt against 2.6? (read that visual needs to be compiled against a specific version at a time). not sure if pythonboost is 2.6 ready per that last link in ubuntu; 2.6 isnt even out of experimental in debian AFAIK. when i "import cvisual", is it actually pulling from: /usr/lib/python2.6/dist-packages/cvisualmodule.so.3.0.0 (+symlinks) --or-- /usr/lib/python2.5/site-packages/cvisualmodule.so.3.0.0 (+symlinks) ? i was going to try and repeatedly replace it with one compiled from source, and maybe mess with the C++ code. im not particularly knowledgeable of the language but i can help in whatever way need be if possible. ill run under 2.5 for now. ________________________________________ From: Guy K. Kloss [g....@ma...] Sent: Tuesday, August 04, 2009 12:22 AM To: vis...@li... Subject: Re: [Visualpython-users] Ubuntu packages On Tue, 04 Aug 2009 17:01:59 Tony Risinger wrote: > I'll keep on the report as I would really like to see Visual 5 in the > repo's and functional by final. Building from source is *nice*, but I like > tidy packages. Fully agreed. That's why I keep building .debs as well over installing from source and getting into the shallows of an unmaintainable system over the course of time. After all, VPython is not the only library I need to add to get my stuff going. > I feel like vpython is this hidden gem that I have just now > stumbled across; I think log/data visualization is very powerful, and > visual is letting me focus on the real work. Indeed, very true! It's so much more understandable knocking up a script in no time to place multi-dimensional data in a 3D scene with it. The other gem is of course Mayavi2 for this purpose ... Guy -- Guy K. Kloss Institute of Information and Mathematical Sciences Te Kura Putaiao o Mohiohio me Pangarau Massey University, Albany (North Shore City, Auckland) 473 State Highway 17, Gate 1, Mailroom, Quad B Building voice: +64 9 414-0800 ext. 9585 fax: +64 9 441-8181 G....@ma... http://www.massey.ac.nz/~gkloss ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Visualpython-users mailing list Vis...@li... https://lists.sourceforge.net/lists/listinfo/visualpython-users Tony Risinger Application Development Specialist Tel: 507-535-7563 | Fax: 507-292-5747 | Toll Free: 866-241-0639 To...@Br... http://www.brokerbin.com/ CONFIDENTIAL INFORMATION: This electronic mail message and any attached files contain information intended for the exclusive use of the specific individual(s) or entity(s) to whom it is addressed and may contain information that is propriety, privileged or confidential or otherwise exempt from disclosure. If you are not the intended recipient, please notify the sender immediately, by reply electronic mail or by telephone, of any unintended recipients so we may correct our records. Also, delete the original electronic mail and any attachments without making any copies of the electronic mail message or attachments. |
From: Guy K. K. <g....@ma...> - 2009-08-04 05:22:45
|
On Tue, 04 Aug 2009 17:01:59 Tony Risinger wrote: > I'll keep on the report as I would really like to see Visual 5 in the > repo's and functional by final. Building from source is *nice*, but I like > tidy packages. Fully agreed. That's why I keep building .debs as well over installing from source and getting into the shallows of an unmaintainable system over the course of time. After all, VPython is not the only library I need to add to get my stuff going. > I feel like vpython is this hidden gem that I have just now > stumbled across; I think log/data visualization is very powerful, and > visual is letting me focus on the real work. Indeed, very true! It's so much more understandable knocking up a script in no time to place multi-dimensional data in a 3D scene with it. The other gem is of course Mayavi2 for this purpose ... Guy -- Guy K. Kloss Institute of Information and Mathematical Sciences Te Kura Pūtaiao o Mōhiohio me Pāngarau Massey University, Albany (North Shore City, Auckland) 473 State Highway 17, Gate 1, Mailroom, Quad B Building voice: +64 9 414-0800 ext. 9585 fax: +64 9 441-8181 G....@ma... http://www.massey.ac.nz/~gkloss |
From: Tony R. <To...@br...> - 2009-08-04 05:02:11
|
Yeah I have a feeling the package is simply missing a binary dep in there somewhere. I tried apt-get build-dep hoping that it would pull in something that was missing from the binary packages's deps, but it still faulted. So for grins I rebuilt the package w/buildpackage... but same thing. I'll keep on the report as I would really like to see Visual 5 in the repo's and functional by final. Building from source is *nice*, but I like tidy packages. I feel like vpython is this hidden gem that I have just now stumbled across; I think log/data visualization is very powerful, and visual is letting me focus on the real work. C Anthony ________________________________________ From: Guy K. Kloss [g....@ma...] Sent: Monday, August 03, 2009 11:36 PM To: Tony Risinger Cc: vis...@li... Subject: Re: [Visualpython-users] Ubuntu packages On Tue, 04 Aug 2009 15:08:55 Tony Risinger wrote: > I have filed a bug report against the python-visual package in karmic here: > > https://bugs.launchpad.net/ubuntu/+source/python2.6/+bug/408663 > > Still getting segfault. I am running a vanilla Karmic; i will try some > other options like build-dep/buildpackage etc. etc. Interesting. So you're running on a binary Karmic already, and have used the binary python-visual package from their repositories. I had backported the package to my (somewhat modified, in some respects not quite vanilla anymore) Jaunty system, and it worked straight out of the box using the "apt-get build- dep" and "dpkg-buildpackage" approach. Hope it's getting fixed, soon. Guy Tony Risinger Application Development Specialist Tel: 507-535-7563 | Fax: 507-292-5747 | Toll Free: 866-241-0639 To...@Br... http://www.brokerbin.com/ CONFIDENTIAL INFORMATION: This electronic mail message and any attached files contain information intended for the exclusive use of the specific individual(s) or entity(s) to whom it is addressed and may contain information that is propriety, privileged or confidential or otherwise exempt from disclosure. If you are not the intended recipient, please notify the sender immediately, by reply electronic mail or by telephone, of any unintended recipients so we may correct our records. Also, delete the original electronic mail and any attachments without making any copies of the electronic mail message or attachments. |
From: Tony R. <To...@br...> - 2009-08-04 04:48:33
|
Thanks for some direction! I managed to get a routine that works for what I wanted; my frame is not shifted away from (0,0,0), and is only rotating on the Y-axis so is probably why this works: def local_space_pos(frame, world): """Returns the position of world in local space.""" origin = visual.vector(1,0,0) axis = visual.cross(frame.axis, origin) theta = frame.axis.diff_angle(origin) trans = visual.vector(world.pos) trans = visual.rotate(trans, angle=theta, axis=axis) return trans I tried some other variations of this, as well as some based of the example on the docs, but none really worked. I think I understand the math for the most part and am more confused about the properties I'm actually using. I could make a function that updates the *.pos directly in the global frame, using all three dimensions, and forget about the local one, but it seems much simpler/cleaner, especially since the frame will contain many objects, to let the frame rotate and push the objects around with simple "shoves"/vectors in a single dimension -- producing a nice helix effect. I looked into the quaternions and friends, and may come back on this if I do decide i want/need an arbitrary method. The rotating is really more eye/shock candy than anything else for this log visualizer I'm constructing, and as my first dabble in python I'm trying to just get the thing rolling, then I'll come back and give the thing pluggable engines and whatnot :-) Thanks again, C Anthony ________________________________________ From: Jim Thomas [jt...@mi...] Sent: Tuesday, July 28, 2009 11:41 AM To: vis...@li... Subject: Re: [Visualpython-users] Arbitrary frame transformation routine I don't have an easy code solution that I can share right now but I can give you some pointers. Firstly quaternions can be used to do this type of thing so you might want to read up on that. A quaternion can be constructed to represent the orientation of each frame and then you can do operations using them to perform rotations between frames. This is how I normally handle a problem like yours. Also visual has a rotate function which you could use. You can transform the position of a point using a series of rotations (after first subtracting the difference of the frame origins). The example you site shows how to get x,y, and z axes from the axis and up vectors that visual uses. Then for each axis you perform a rotation (in series). The axis about which you rotate is computed using the cross product (cross(f1.x, f2.x)) and the angle is computed using the dot product (acos(dot(f1.x, f2.x)). Rotate your point vector then repeat for y and z. You must trap for the condition where the magnitude of the cross product is near zero, in which case you skip that rotation step since they are already aligned. There is probably a shortcut along the lines of what the example does but I have not worked it out. Also if you were working with something asymmetric rather than a sphere you would have to do transformations on axis and up for the object as well. Hope this helps at least a little bit. I have code that will do this but it is in no condition for me to publish at this time and I cannot extract a snippet that will help you, I'd have to release a whole lot of code. I guess I need to work on getting my library for visual python out the door... JT PS There are a couple of quaternion functions in the odelib portion of my VisualPyODE library that I have released. Unfortunately it is probably not enough to be a big help but if you are interested download the code at http://www.missioncognition.net. For that library ODE is the owner of the coordinates/orientations and I just slave the visual objects off of them. Still you might find some of code informative. Tony Risinger wrote: > I have been trying to no avail to write a routine to transform the coordinates of vector from the global frame to a local one; or even better would be a routine that transforms from one arbitrary frame to another (then global frame is just pos(0,0,0) and axis(1,0,0)). the example in the documentation translates from local-to-global, but i cant seem to reverse it. seems that my vector skills are weak... > > in this log file visualizer i am working on, i have a sphere traveling thru the global frame, but at a specified point, or at init, i want to inject it into a rotating local frame. i want the switch to the localized frame to appear seamless, thus i need to get the local coordinates relative to the global ones the sphere currently has. > > is functionality of this type already present somewhere in the module but im missing it? once i apply a frame to an object it immediately moves the coordinates it currently has but relative to the local frame, so it appears to jump thru space. this is great and expected, i just need to get the switchover down now. > > does anyone have something whipped up already that you could kindly share? otherwise direction of any kind would be greatly appreciated. > > Thanks, > > Tony Risinger > Application Development Specialist > Tel: 507-535-7563 | Fax: 507-292-5747 | Toll Free: 866-241-0639 > > To...@Br... > > http://www.brokerbin.com/ > > CONFIDENTIAL INFORMATION: This electronic mail message and any attached files contain information intended for the exclusive use of the specific individual(s) or entity(s) to whom it is addressed and may contain information that is propriety, privileged or confidential or otherwise exempt from disclosure. If you are not the intended recipient, please notify the sender immediately, by reply electronic mail or by telephone, of any unintended recipients so we may correct our records. Also, delete the original electronic mail and any attachments without making any copies of the electronic mail message or attachments. > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Visualpython-users mailing list Vis...@li... https://lists.sourceforge.net/lists/listinfo/visualpython-users Tony Risinger Application Development Specialist Tel: 507-535-7563 | Fax: 507-292-5747 | Toll Free: 866-241-0639 To...@Br... http://www.brokerbin.com/ CONFIDENTIAL INFORMATION: This electronic mail message and any attached files contain information intended for the exclusive use of the specific individual(s) or entity(s) to whom it is addressed and may contain information that is propriety, privileged or confidential or otherwise exempt from disclosure. If you are not the intended recipient, please notify the sender immediately, by reply electronic mail or by telephone, of any unintended recipients so we may correct our records. Also, delete the original electronic mail and any attachments without making any copies of the electronic mail message or attachments. |
From: Guy K. K. <g....@ma...> - 2009-08-04 04:37:23
|
On Tue, 04 Aug 2009 15:08:55 Tony Risinger wrote: > I have filed a bug report against the python-visual package in karmic here: > > https://bugs.launchpad.net/ubuntu/+source/python2.6/+bug/408663 > > Still getting segfault. I am running a vanilla Karmic; i will try some > other options like build-dep/buildpackage etc. etc. Interesting. So you're running on a binary Karmic already, and have used the binary python-visual package from their repositories. I had backported the package to my (somewhat modified, in some respects not quite vanilla anymore) Jaunty system, and it worked straight out of the box using the "apt-get build- dep" and "dpkg-buildpackage" approach. Hope it's getting fixed, soon. Guy -- Guy K. Kloss Institute of Information and Mathematical Sciences Te Kura Pūtaiao o Mōhiohio me Pāngarau Massey University, Albany (North Shore City, Auckland) 473 State Highway 17, Gate 1, Mailroom, Quad B Building voice: +64 9 414-0800 ext. 9585 fax: +64 9 441-8181 G....@ma... http://www.massey.ac.nz/~gkloss |
From: Bruce S. <Bru...@nc...> - 2009-08-04 04:10:36
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=UTF-8" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> In the documentation on mouse interactions concerning scene.mouse: <br> <br> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; text-align: justify; text-indent: -72px;"><span class="attribute" style="color: rgb(255, 0, 0);">pick</span><span class="Apple-converted-space"> </span>The nearest object in the scene which falls under the cursor, or None. At present only spheres, boxes, cylinders, and convex can be picked. The picked object is <span class="attribute" style="color: rgb(255, 0, 0);">scene.mouse.pick<br> <br> </span></span></span>Actually, this is much less restrictive in Visual 5.11. I will change the documentation to say "At present helix and label objects cannot be picked."<br> <br> Bruce Sherwood<br> <br> Jon Schull wrote: <blockquote cite="mid:756...@ma..." type="cite"> <div>Is there some code to show how to identify the object that lies beneath a mouse click?</div> <div>(so the user can use the mouse to select a visible object?)</div> <div><br> </div> <br clear="all"> Jon Schull <a moz-do-not-send="true" href="mailto:sc...@di...">sc...@di...</a> cell: 585-738-6696 <br> Associate Professor Rochester Institute of Technology <br> <br> <pre wrap=""> <hr size="4" width="90%"> ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. <a class="moz-txt-link-freetext" href="http://p.sf.net/sfu/bobj-july">http://p.sf.net/sfu/bobj-july</a></pre> <pre wrap=""> <hr size="4" width="90%"> _______________________________________________ Visualpython-users mailing list <a class="moz-txt-link-abbreviated" href="mailto:Vis...@li...">Vis...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/visualpython-users">https://lists.sourceforge.net/lists/listinfo/visualpython-users</a> </pre> </blockquote> </body> </html> |
From: Jon S. <js...@gm...> - 2009-08-04 03:48:38
|
Is there some code to show how to identify the object that lies beneath a mouse click? (so the user can use the mouse to select a visible object?) Jon Schull sc...@di... cell: 585-738-6696 Associate Professor Rochester Institute of Technology |
From: Tony R. <To...@br...> - 2009-08-04 03:09:12
|
I have filed a bug report against the python-visual package in karmic here: https://bugs.launchpad.net/ubuntu/+source/python2.6/+bug/408663 Still getting segfault. I am running a vanilla Karmic; i will try some other options like build-dep/buildpackage etc. etc. ________________________________________ From: Guy K. Kloss [g....@ma...] Sent: Sunday, July 19, 2009 2:50 PM To: vis...@li... Subject: Re: [Visualpython-users] Ubuntu packages On Mon, 20 Jul 2009 05:54:46 Tony Risinger wrote: > I usually begin testing around alpha 3 release, so in the next week or so I > will test the visual 5 package in karmic. That is BTW the one that I have backported to Jaunty. You can just apt-get source it after adding the karmic sources to the sources.list. Pull in with apt-get build-dep the build dependencies, and build the package with dpkg- buildpackage. Maybe that solves the issue already. I could imagine that the VPython package depends on something, that in turn pulls in something else. And you may have some dependencies satisfied, but not subsequent deps ... I am not running a vanilla Jaunty here, so there may have been some slightly off libraries or versions my Jaunty package was compiled against. As you said, this way I'm running and debugging the upcoming Ubuntu releases packages already. So far they seemed very well done by the maintainer. Guy Tony Risinger Application Development Specialist Tel: 507-535-7563 | Fax: 507-292-5747 | Toll Free: 866-241-0639 To...@Br... http://www.brokerbin.com/ CONFIDENTIAL INFORMATION: This electronic mail message and any attached files contain information intended for the exclusive use of the specific individual(s) or entity(s) to whom it is addressed and may contain information that is propriety, privileged or confidential or otherwise exempt from disclosure. If you are not the intended recipient, please notify the sender immediately, by reply electronic mail or by telephone, of any unintended recipients so we may correct our records. Also, delete the original electronic mail and any attachments without making any copies of the electronic mail message or attachments. |
From: Joe H. <hea...@gm...> - 2009-08-04 02:18:45
|
Okay I just tested the latest VPython on my 13" MBP with an NVIDIA GeForce 9400M graphics card and I can *finally* see textures and materials! However, VIDLE refuses to work so I'll have to do what I did before VIDLE was released, namely replace one of IDLE's configuration files with one that "turns on" the configuration menu option and adds a link to Visual's documentation. I don't recall that particular file's name, but I'll post here when I find it. Joe |
From: Bruce S. <Bru...@nc...> - 2009-08-03 22:45:37
|
Thanks! I've removed that old code from faces_heightfield.py. I notice that the program was written by David Scherer in 2001. Bruce Sherwood Jamie Riotto wrote: > Bruce, > Your suggestion for a quicker way to reset faces objects works great. > Thanks for pointing this out. > It is a significant speedup if recalculating lots of faces objects. > > Also, I copied the "try norm" lines right out of faces_heightfield.py > in the examples folder. > Probably should change that as it looks like it is no longer (if it > ever was) needed. > > Thanks for you time on this - Jamie Riotto > > > |
From: Jamie R. <jam...@gm...> - 2009-08-03 18:29:09
|
Bruce, Your suggestion for a quicker way to reset faces objects works great. Thanks for pointing this out. It is a significant speedup if recalculating lots of faces objects. Also, I copied the "try norm" lines right out of faces_heightfield.py in the examples folder. Probably should change that as it looks like it is no longer (if it ever was) needed. Thanks for you time on this - Jamie Riotto On Sat, Aug 1, 2009 at 3:09 PM, Bruce Sherwood<Bru...@nc...> wrote: > It occurred to me to try a different approach to the issue of deleting a > faces object and recreating it. I would guess that performance ought to > be significantly better if you simply change the faces.pos array as in > the following version. > > Also note the minor point that it isn't necessary to "try" whether > norm(v) works and then making v = vector(0,0,0) if it doesn't work. As > the documentation for vector operations in Visual says, if v is > vector(0,0,0), as a convenience norm(v) returns vector(0,0,0), just as > you wanted. > > Bruce Sherwood > ------------------------- > > from __future__ import division > from visual import * > > newframe = frame > > class Object(object): > > def __init__(self, parent=None, frame=None, pos=(0,0,0), axis=(1,0,0), > color=color.green): > self.frame = newframe(frame=frame, pos=pos, axis=axis) > self.surface = faces(frame=self.frame) > self.color = color > self.clearSurface() > > def clearSurface(self): > self.surface.pos = [] > self.vertexList = [] > self.normalList = [] > self.colorList = [] > > def addTri(self, p1, p2, p3): > """Add a triangle to the model""" > v1 = vector(p1) > v2 = vector(p2) > v3 = vector(p3) > > normal = norm( cross(v2-v1, v3-v1) ) > > ## try is not necessary; norm(vector(0,0,0)) is vector(0,0,0) - see docs > ## try: > ## normal = norm( cross(v2-v1, v3-v1) ) > ## except: > ## normal = vector(0,0,0) > > self.vertexList = self.vertexList + [v1,v2,v3] > self.normalList = self.normalList + [normal,normal,normal] > self.colorList = self.colorList + > [self.color,self.color,self.color] > > def computeSurface(self): > """ Create faces out of vertex, normal and color info""" > self.surface.pos = self.vertexList > self.surface.normal = self.normalList > self.surface.color = self.colorList > ## self.surface = faces(frame=self.frame, pos=self.vertexList, > ## normal=self.normalList, > ## color=self.colorList) > > if __name__ == '__main__': > # origin sphere for reference > sphere(radius=0.1) > > p1 = (-2, -1, 0) > p2 = (-1, 1, 0) > p3 = (-2, 1, 0) > > > p4 = (3, -1, 0) > p5 = (5, -1, 0) > p6 = (4, 2, 0) > > x=Object() > x.addTri(p1, p2, p3) > x.computeSurface() > scene.mouse.getclick() > > print "new surface" > x.clearSurface() > x.addTri(p4, p5, p6) > x.computeSurface() > print x.vertexList > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
From: Joe H. <hea...@gm...> - 2009-08-02 01:48:20
|
On Aug 1, 2009, at 4:20 PM, vis...@li... wrote: > Message: 6 > Date: Sat, 01 Aug 2009 14:20:16 -0600 > From: Bruce Sherwood <Bru...@nc...> > Subject: Re: [Visualpython-users] materials and textures on MacBook > Pro simply not working > To: Visualpython-users <vis...@li...> > Message-ID: <4A7...@nc...> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > I have access to a MacBook Pro "3.1" (whatever that means) running OSX > 10.5.7 with NVIDIA GeForce 8600M GT graphics. It displays materials. > (But it's one of those machines where I can run a VPython program > from a > terminal but not from VIDLE.) Okay tonight I picked up a 13" MBP with the NVIDIA GeForce 9400M . I'll test it with VPython tomorrow. Joe Heafner (follow me on Twitter: twitter.com/heafnerj) email: heafnerj(at)gmail(dot)com URL: www(dot)SticksAndShadows(dot)com |
From: Bruce S. <Bru...@nc...> - 2009-08-01 22:10:22
|
It occurred to me to try a different approach to the issue of deleting a faces object and recreating it. I would guess that performance ought to be significantly better if you simply change the faces.pos array as in the following version. Also note the minor point that it isn't necessary to "try" whether norm(v) works and then making v = vector(0,0,0) if it doesn't work. As the documentation for vector operations in Visual says, if v is vector(0,0,0), as a convenience norm(v) returns vector(0,0,0), just as you wanted. Bruce Sherwood ------------------------- from __future__ import division from visual import * newframe = frame class Object(object): def __init__(self, parent=None, frame=None, pos=(0,0,0), axis=(1,0,0), color=color.green): self.frame = newframe(frame=frame, pos=pos, axis=axis) self.surface = faces(frame=self.frame) self.color = color self.clearSurface() def clearSurface(self): self.surface.pos = [] self.vertexList = [] self.normalList = [] self.colorList = [] def addTri(self, p1, p2, p3): """Add a triangle to the model""" v1 = vector(p1) v2 = vector(p2) v3 = vector(p3) normal = norm( cross(v2-v1, v3-v1) ) ## try is not necessary; norm(vector(0,0,0)) is vector(0,0,0) - see docs ## try: ## normal = norm( cross(v2-v1, v3-v1) ) ## except: ## normal = vector(0,0,0) self.vertexList = self.vertexList + [v1,v2,v3] self.normalList = self.normalList + [normal,normal,normal] self.colorList = self.colorList + [self.color,self.color,self.color] def computeSurface(self): """ Create faces out of vertex, normal and color info""" self.surface.pos = self.vertexList self.surface.normal = self.normalList self.surface.color = self.colorList ## self.surface = faces(frame=self.frame, pos=self.vertexList, ## normal=self.normalList, ## color=self.colorList) if __name__ == '__main__': # origin sphere for reference sphere(radius=0.1) p1 = (-2, -1, 0) p2 = (-1, 1, 0) p3 = (-2, 1, 0) p4 = (3, -1, 0) p5 = (5, -1, 0) p6 = (4, 2, 0) x=Object() x.addTri(p1, p2, p3) x.computeSurface() scene.mouse.getclick() print "new surface" x.clearSurface() x.addTri(p4, p5, p6) x.computeSurface() print x.vertexList |
From: Bruce S. <Bru...@nc...> - 2009-08-01 20:20:33
|
I have access to a MacBook Pro "3.1" (whatever that means) running OSX 10.5.7 with NVIDIA GeForce 8600M GT graphics. It displays materials. (But it's one of those machines where I can run a VPython program from a terminal but not from VIDLE.) Bruce Sherwood Joe Heafner wrote: > I've found that I simply can't get materials and textures working on > my first generation MacBook Pro. I'm looking into getting either a new > 13" MacBook Pro (unibody) or a MacBook Air. Is anyone able to get both > textures and materials to work on either of these machines? I'm at my > wit's end with this problem. Updating my graphics driver isn't an > option since I'm at Apple's mercy when it comes to drivers. > > Joe Heafner (follow me on Twitter: twitter.com/heafnerj) > email: heafnerj(at)gmail(dot)com URL: www(dot)SticksAndShadows(dot)com > > > > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
From: Joe H. <hea...@gm...> - 2009-08-01 19:20:49
|
I've found that I simply can't get materials and textures working on my first generation MacBook Pro. I'm looking into getting either a new 13" MacBook Pro (unibody) or a MacBook Air. Is anyone able to get both textures and materials to work on either of these machines? I'm at my wit's end with this problem. Updating my graphics driver isn't an option since I'm at Apple's mercy when it comes to drivers. Joe Heafner (follow me on Twitter: twitter.com/heafnerj) email: heafnerj(at)gmail(dot)com URL: www(dot)SticksAndShadows(dot)com |
From: Derek L. <dl...@ma...> - 2009-07-29 23:42:43
|
Thanks Kadir for your advise. In order to solve the problem I actually ended up deleting the dependency for the .tga files from materials.py (I wasn't using them anyway). It worked fine. |
From: Jamie R. <jam...@gm...> - 2009-07-29 18:31:34
|
Bruce, Wow, thanks, that clears up a lot. I've been confused (obviously) about the invisible / delete relationship for a while. Cheers - jamie On Wed, Jul 29, 2009 at 11:15 AM, Bruce Sherwood<Bru...@nc...> wrote: > You merely need to make the object invisible before deleting it: > > def clearSurface(self): > self.surface.visible = False > del self.surface > ..... > > The issue is this: The human viewer counts as a reference for a VPython > object. For example, if you create ball = sphere() and then later say > ball = 3, there is no longer any way to reference the sphere and in a > non-VPython program Python would be free to delete the sphere. But > because the sphere is still visible on the screen, the reference count > does not go to zero and the human viewer can still view the sphere. > Hence the documented rule that you need to make an object invisible to > get rid of it (though the documentation could be a bit clearer on this). > > Bruce Sherwood > > Jamie Riotto wrote: >> Sure, here is a scaled down version of the surface demo. I expect >> to see only one triangle after the "clearSurface" but I still see two. >> >> Thanks - jamie >> >> >> >> from __future__ import division >> from PyQt4.QtCore import * >> from PyQt4.QtGui import * >> from visual import * >> >> newframe = frame >> >> class Object(object): >> >> def __init__(self, parent=None, frame=None, pos=(0,0,0), axis=(1,0,0), >> color=color.green): >> self.frame = newframe(frame=frame, pos=pos, axis=axis) >> self.surface = faces(frame=self.frame) >> self.color = color >> self.vertexList = [] >> self.normalList = [] >> self.colorList = [] >> >> def clearSurface(self): >> del self.surface >> self.surface = faces(frame=self.frame) >> self.vertexList = [] >> self.normalList = [] >> >> def addTri(self, p1, p2, p3): >> """Add a triangle to the model""" >> v1 = vector(p1) >> v2 = vector(p2) >> v3 = vector(p3) >> >> try: >> normal = norm( cross(v2-v1, v3-v1) ) >> except: >> normal = vector(0,0,0) >> >> self.vertexList = self.vertexList + [v1,v2,v3] >> self.normalList = self.normalList + [normal,normal,normal] >> self.colorList = self.colorList + [self.color,self.color,self.color] >> >> >> def computeSurface(self): >> """ Create faces out of vertex, normal and color info""" >> self.surface = faces(frame=self.frame, pos=self.vertexList, >> normal=self.normalList, >> color=self.colorList) >> >> >> >> if __name__ == '__main__': >> # origin sphere for reference >> sphere(radius=0.1) >> >> p1 = (-2, -1, 0) >> p2 = (-1, 1, 0) >> p3 = (-2, 1, 0) >> >> >> p4 = (3, -1, 0) >> p5 = (5, -1, 0) >> p6 = (4, 2, 0) >> >> x=Object() >> x.addTri(p1, p2, p3) >> x.computeSurface() >> >> print "new surface" >> x.clearSurface() >> x.addTri(p4, p5, p6) >> x.computeSurface() >> print x.vertexList >> >> >> On Wed, Jul 29, 2009 at 8:52 AM, Bruce Sherwood<Bru...@nc...> wrote: >>> Could you please post a short test routine that illustrates the problem? >>> Thanks. >>> >>> Bruce Sherwood >>> >>> Jamie Riotto wrote: >>>> I have a VPython faces based object. I would like the user to be able to change >>>> fundamental parameters that affect its shape (like setting numSides on >>>> a Polygon), >>>> but I can't seem to get VPython to re-render the new shape. I've tried >>>> to "Del" the >>>> existing face list, then create a new one, but the old object is still >>>> shown. Any suggestions? >>>> >>>> Thank - Jamie Riotto >>>> >>>> ------------------------------------------------------------------------------ >>>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >>>> trial. Simplify your report design, integration and deployment - and focus on >>>> what you do best, core application coding. Discover what's new with >>>> Crystal Reports now. http://p.sf.net/sfu/bobj-july >>>> _______________________________________________ >>>> Visualpython-users mailing list >>>> Vis...@li... >>>> https://lists.sourceforge.net/lists/listinfo/visualpython-users >>> ------------------------------------------------------------------------------ >>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >>> trial. Simplify your report design, integration and deployment - and focus on >>> what you do best, core application coding. Discover what's new with >>> Crystal Reports now. http://p.sf.net/sfu/bobj-july >>> _______________________________________________ >>> Visualpython-users mailing list >>> Vis...@li... >>> https://lists.sourceforge.net/lists/listinfo/visualpython-users >>> >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >> trial. Simplify your report design, integration and deployment - and focus on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Visualpython-users mailing list >> Vis...@li... >> https://lists.sourceforge.net/lists/listinfo/visualpython-users > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
From: Bruce S. <Bru...@nc...> - 2009-07-29 18:15:34
|
You merely need to make the object invisible before deleting it: def clearSurface(self): self.surface.visible = False del self.surface ..... The issue is this: The human viewer counts as a reference for a VPython object. For example, if you create ball = sphere() and then later say ball = 3, there is no longer any way to reference the sphere and in a non-VPython program Python would be free to delete the sphere. But because the sphere is still visible on the screen, the reference count does not go to zero and the human viewer can still view the sphere. Hence the documented rule that you need to make an object invisible to get rid of it (though the documentation could be a bit clearer on this). Bruce Sherwood Jamie Riotto wrote: > Sure, here is a scaled down version of the surface demo. I expect > to see only one triangle after the "clearSurface" but I still see two. > > Thanks - jamie > > > > from __future__ import division > from PyQt4.QtCore import * > from PyQt4.QtGui import * > from visual import * > > newframe = frame > > class Object(object): > > def __init__(self, parent=None, frame=None, pos=(0,0,0), axis=(1,0,0), > color=color.green): > self.frame = newframe(frame=frame, pos=pos, axis=axis) > self.surface = faces(frame=self.frame) > self.color = color > self.vertexList = [] > self.normalList = [] > self.colorList = [] > > def clearSurface(self): > del self.surface > self.surface = faces(frame=self.frame) > self.vertexList = [] > self.normalList = [] > > def addTri(self, p1, p2, p3): > """Add a triangle to the model""" > v1 = vector(p1) > v2 = vector(p2) > v3 = vector(p3) > > try: > normal = norm( cross(v2-v1, v3-v1) ) > except: > normal = vector(0,0,0) > > self.vertexList = self.vertexList + [v1,v2,v3] > self.normalList = self.normalList + [normal,normal,normal] > self.colorList = self.colorList + [self.color,self.color,self.color] > > > def computeSurface(self): > """ Create faces out of vertex, normal and color info""" > self.surface = faces(frame=self.frame, pos=self.vertexList, > normal=self.normalList, > color=self.colorList) > > > > if __name__ == '__main__': > # origin sphere for reference > sphere(radius=0.1) > > p1 = (-2, -1, 0) > p2 = (-1, 1, 0) > p3 = (-2, 1, 0) > > > p4 = (3, -1, 0) > p5 = (5, -1, 0) > p6 = (4, 2, 0) > > x=Object() > x.addTri(p1, p2, p3) > x.computeSurface() > > print "new surface" > x.clearSurface() > x.addTri(p4, p5, p6) > x.computeSurface() > print x.vertexList > > > On Wed, Jul 29, 2009 at 8:52 AM, Bruce Sherwood<Bru...@nc...> wrote: >> Could you please post a short test routine that illustrates the problem? >> Thanks. >> >> Bruce Sherwood >> >> Jamie Riotto wrote: >>> I have a VPython faces based object. I would like the user to be able to change >>> fundamental parameters that affect its shape (like setting numSides on >>> a Polygon), >>> but I can't seem to get VPython to re-render the new shape. I've tried >>> to "Del" the >>> existing face list, then create a new one, but the old object is still >>> shown. Any suggestions? >>> >>> Thank - Jamie Riotto >>> >>> ------------------------------------------------------------------------------ >>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >>> trial. Simplify your report design, integration and deployment - and focus on >>> what you do best, core application coding. Discover what's new with >>> Crystal Reports now. http://p.sf.net/sfu/bobj-july >>> _______________________________________________ >>> Visualpython-users mailing list >>> Vis...@li... >>> https://lists.sourceforge.net/lists/listinfo/visualpython-users >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >> trial. Simplify your report design, integration and deployment - and focus on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Visualpython-users mailing list >> Vis...@li... >> https://lists.sourceforge.net/lists/listinfo/visualpython-users >> > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Jamie R. <jam...@gm...> - 2009-07-29 16:56:52
|
Sure, here is a scaled down version of the surface demo. I expect to see only one triangle after the "clearSurface" but I still see two. Thanks - jamie from __future__ import division from PyQt4.QtCore import * from PyQt4.QtGui import * from visual import * newframe = frame class Object(object): def __init__(self, parent=None, frame=None, pos=(0,0,0), axis=(1,0,0), color=color.green): self.frame = newframe(frame=frame, pos=pos, axis=axis) self.surface = faces(frame=self.frame) self.color = color self.vertexList = [] self.normalList = [] self.colorList = [] def clearSurface(self): del self.surface self.surface = faces(frame=self.frame) self.vertexList = [] self.normalList = [] def addTri(self, p1, p2, p3): """Add a triangle to the model""" v1 = vector(p1) v2 = vector(p2) v3 = vector(p3) try: normal = norm( cross(v2-v1, v3-v1) ) except: normal = vector(0,0,0) self.vertexList = self.vertexList + [v1,v2,v3] self.normalList = self.normalList + [normal,normal,normal] self.colorList = self.colorList + [self.color,self.color,self.color] def computeSurface(self): """ Create faces out of vertex, normal and color info""" self.surface = faces(frame=self.frame, pos=self.vertexList, normal=self.normalList, color=self.colorList) if __name__ == '__main__': # origin sphere for reference sphere(radius=0.1) p1 = (-2, -1, 0) p2 = (-1, 1, 0) p3 = (-2, 1, 0) p4 = (3, -1, 0) p5 = (5, -1, 0) p6 = (4, 2, 0) x=Object() x.addTri(p1, p2, p3) x.computeSurface() print "new surface" x.clearSurface() x.addTri(p4, p5, p6) x.computeSurface() print x.vertexList On Wed, Jul 29, 2009 at 8:52 AM, Bruce Sherwood<Bru...@nc...> wrote: > Could you please post a short test routine that illustrates the problem? > Thanks. > > Bruce Sherwood > > Jamie Riotto wrote: >> I have a VPython faces based object. I would like the user to be able to change >> fundamental parameters that affect its shape (like setting numSides on >> a Polygon), >> but I can't seem to get VPython to re-render the new shape. I've tried >> to "Del" the >> existing face list, then create a new one, but the old object is still >> shown. Any suggestions? >> >> Thank - Jamie Riotto >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >> trial. Simplify your report design, integration and deployment - and focus on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Visualpython-users mailing list >> Vis...@li... >> https://lists.sourceforge.net/lists/listinfo/visualpython-users > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
From: Bruce S. <Bru...@nc...> - 2009-07-29 15:53:06
|
Could you please post a short test routine that illustrates the problem? Thanks. Bruce Sherwood Jamie Riotto wrote: > I have a VPython faces based object. I would like the user to be able to change > fundamental parameters that affect its shape (like setting numSides on > a Polygon), > but I can't seem to get VPython to re-render the new shape. I've tried > to "Del" the > existing face list, then create a new one, but the old object is still > shown. Any suggestions? > > Thank - Jamie Riotto > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |