From: Qi P. <qp...@ca...> - 2009-02-07 17:28:22
|
Thanks for filing the bug tracker. I'm thinking I've found another bug though when using CGAL with geomview... If the camera is transformed using the commands: (read transform { transform define campose 0.844592 0.166562 -0.508845 0.000000 0.166564 -0.984959 -0.045944 0.000000 -0.508844 -0.045952 -0.859632 0.000000 2.083080 0.269067 -0.853154 1.000000 } ) (camera "c0" camera { fov 67 worldtocam { : campose} } ) Then geomview segfaults when trying to draw more triangles using CGAL's interface... I get the error: Geomview(29301): internal error: "Segmentation violation"; dump core now (y/n) [n] ? (I'm relaying the GCL commands to geomview from my c++ code via a CGAL::Geomview_stream). Where is the log stored? I can't seem to find it (i've performed a "locate geomview.log" with no results). Googling for the error code leads to nothing :-( Thanks for your help - currently trying to code something up for a video in a computer vision conference talk in 3 days time, so your time has been invaluable :-) Cheers, Qi 2009/2/7 <L....@su...> > I've opened a bug on this in the tracker. > > https://sourceforge.net/tracker/index.php?func=detail&aid=2577843&group_id=9736&atid=109736 > > For the triangle code, all I can think of: inspect piping output and make > sure everything is closed > and opened properly. One misplaced bracket can stall everything... > > > <http://www.ee.surrey.ac.uk/Personal/L.Wood/><L....@su...> > > > > -----Original Message----- > From: L....@su... [mailto:L....@su...<L....@su...> > ] > Sent: Sat 2009-02-07 16:52 > To: qp...@ca... > Cc: cl...@ma...; geo...@li... > Subject: Re: [geomview-users] geomview command language - transform command > > I just noticed in geomview/ChangeLog: > > 2006-10-29 Claus-Justus Heine <Claus.Heine@Mathematik.Uni-Freiburg.DE> > > * src/bin/NDview/NDdemo, src/bin/NDview/NDview, > src/bin/geomview/common/drawer.c, src/bin/geomview/common/motion.c, > src/bin/geomview/common/space.c, src/bin/geomview/common/transform.c, > src/bin/geomview/common/transform.h, src/bin/geomview/common/ui.c, > src/bin/geomview/x11/gvtoolui.c, src/bin/geomview/x11/gvui.c, > src/bin/geomview/x11/interface/Tool.mib, src/bin/gvclock/gvclock.in: > The "origin/bbox-center" keyword to transform and transform-incr > was a > bad idea. There is still a new button in the Tools-menu which > translates the CENTER object to the currently selected geom's > bounding box. > > Don't know why it was a bad idea - presumably it needs to be removed > from documentation. The change in (help transform) output from 1.8 to 1.9 > suggests that this change was not completely reverted. > > L. > > <http://www.ee.surrey.ac.uk/Personal/L.Wood/><L....@su...> > > > > -----Original Message----- > From: qi...@go... on behalf of Qi Pan > Sent: Sat 2009-02-07 16:04 > To: Wood L Dr (Electronic Eng) > Cc: geo...@li...; cl...@ma... > Subject: Re: [geomview-users] geomview command language - transform command > > Hi, > > Thanks for your help - I think I'll give up with the bounding box center > approach for the time being then. > > I've managed to get the camera into the views i want by repeatedly using > the > following command (with different tranfromation matrices): > > (read transform { transform define > > campose > > 0.844592 0.166562 -0.508845 0.000000 > > 0.166564 -0.984959 -0.045944 0.000000 > > -0.508844 -0.045952 -0.859632 0.000000 > > 2.083080 0.269067 -0.853154 1.000000 > } ) > > (progn (camera "c0" camera { fov 67 worldtocam { : campose} } ) ) > > This all works well, apart from the fact I can't seem to be able to draw > more triangles into the scene and then change the camera view! > > Am I going about transforming the camera in an incorrect way? The triangle > drawing command (in my c++ code - i'm using Geomview via CGAL) is: > > gv.draw_triangles(cgal_triangles.begin(), cgal_triangles.end()); > > where gv is a CGAL::Geomview_stream and cgaltriangles is a std::vector of > triangles. > > Thanks for your help, > > Qi > 2009/2/7 <L....@su...> > > > I played around with a variety of geomview versions, looking > > at what (help transform) outputted (to stderr in the terminal > > window - odd not to see the output in the Geomview command > > window.) > > > > Geomview 1.8.1/.2rc9 gives: > > (transform objectID centerID frameID > > [rotate|translate|translate-scaled|scale] x y z [dt] ["smooth"]) > > > > Geomview 1.9.0-4 gives: > > (transform objectID centerID frameID > > [rotate|translate|translate-scaled|scale] x y z [dt ["smooth"]]) > > > > which has different nesting of dt etc at the end - so something > > has certainly changed in the parser. > > > > A look through the documentation tells me: > > > > > http://geomview.cvs.sourceforge.net/viewvc/geomview/geomview/doc/geomview.texi?r1=1.12&r2=1.13&pathrev=MAIN > > that the bbox-center|origin tag was introduced by Claus (rotdrop) > > on 29 October 2006 - line 6826. And Claus has made transform changes, > > as the comparison of help outputs above suggests, but the documentation > > seems a little awry > > from what was implemented. Claus? > > > > Unfortunately, bounding box control doesn't seem to be one of the things > > that can be handled > > as a keypress, using an undocumented command in > > geomview/src/bin/geomview/common/ui.c > > (event-mode '[ab] Cam Orbit') > > but adding it somehow might be a workaround. > > > > hope this helps, > > > > > > L. > > > > <http://www.ee.surrey.ac.uk/Personal/L.Wood/><L....@su...> > > > > > > > > -----Original Message----- > > From: qi...@go... on behalf of Qi Pan > > Sent: Sat 2009-02-07 12:45 > > To: Wood L Dr (Electronic Eng) > > Cc: geo...@li... > > Subject: Re: [geomview-users] geomview command language - transform > command > > > > Thanks again for your reply. Downloaded and installed 1.8.2.rc9, but > > getting > > the same thing. Both versions do not list bbox-center as an option when > > typing (help transform) and both give the same error message if > bbox-center > > is added into the command... > > > > Do you get bbox-center as an option when you type (help transform) in the > > console? > > > > Thanks, > > > > Qi > > > > 2009/2/7 <L....@su...> > > > > > Okay, the bbox-center option _should_ work in the command. > > > > > > Can you please try geomview 1.8.2rc9 and see whether the option > > > works there for you? I'd like to narrow down whether your problem is > the > > > result of the 1.9 BBox changes, or indicative of something deeper. > > > > > > > > > http://sourceforge.net/project/showfiles.php?group_id=9736&package_id=9969 > > > and click pre-release. > > > > > > Provided you're placing objects with location global (rather than > > relative > > > to the camera), setting camera position should not be a problem. > > > > > > http://www.geom.uiuc.edu/software/geomview/ooglman.html > > > > > > # Example 1: A gcl command to define a transform > > > # called "fred" > > > > > > (read transform { transform define fred > > > 1 0 0 0 > > > 0 1 0 0 > > > 0 0 1 0 > > > -3 0 1 1 > > > } > > > ) > > > > > > # Example 2: A camera object using transform > > > # "fred" for camera positioning > > > # Given the definition above, this puts the camera at > > > # (-3, 0, 1), looking toward -Z. > > > > > > { camera > > > halfyfield 1 > > > aspect 1.33 > > > camtoworld { : fred } > > > } > > > > > > > > > L. > > > > > > > > > <http://www.ee.surrey.ac.uk/Personal/L.Wood/><L....@su...> > > > > > > > > > > > > -----Original Message----- > > > From: qi...@go... on behalf of Qi Pan > > > Sent: Sat 2009-02-07 9:39 > > > To: Wood L Dr (Electronic Eng) > > > Cc: geo...@li... > > > Subject: Re: [geomview-users] geomview command language - transform > > command > > > > > > Hi there, > > > > > > thanks for your reply. The checkbox works great, but unfortunately I'm > > > using > > > geomview as an automatic viewer. I have a camera which is moving and > > would > > > like to set the view in geomview to the real-time position of the > camera > > > calculated from my c++ code (without requring human interaction). The > > > camera > > > is circling the object (approximately), so I was going to use rotation > > > around the center of the bounding box to approxiate. However, if the > > > automated function seems to have been taken away, is there a way to set > > the > > > camera position using a 4x4 transformation matrix with the Geomview > > Command > > > Language? > > > > > > Thanks, > > > > > > Qi > > > 2009/2/7 <L....@su...> > > > > > > > One of the changes Claus made to Geomview 1.9.0 was to add a > > > > small '[B]box center' checkbox to the top of the Tools menu, to do > > > > just this. Does that work? > > > > > > > > L. > > > > > > > > SaVi satellite constellation visualization: http://savi.sf.net/ > > > > > > > > <http://www.ee.surrey.ac.uk/Personal/L.Wood/><L....@su...> > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > From: Qi Pan [mailto:qp...@ca... <qp...@ca...> < > qp...@ca...> < > > qp...@ca...> <qp...@ca... > > > >] > > > > Sent: Sat 2009-02-07 1:13 > > > > To: geo...@li... > > > > Subject: [geomview-users] geomview command language - transform > command > > > > > > > > Hi, > > > > > > > > in the manual for the 1.9.4, it states the GCL transform command is: > > > > > > > > (transform objectID centerID frameID > > > > [rotate|translate|translate-scaled|scale] x y z [bbox-center|origin] > > [dt > > > > [smooth]]) > > > > > > > > http://www.geomview.org/docs/html/transform.html#transform > > > > > > > > However, I can't seem to use the optional [bbox-center|origin] > bit... > > > > > > > > Using the command (transform g1 g1 g1 rotate 3.14 0 0 bbox-center) > > > > > > > > I get: " transform: float expected in arg position 8 (got > > > "bbox-center") > > > > " > > > > > > > > I need an object to rotate around its own bbox-center, which seems > > > > impossible without this option. > > > > > > > > Typing help in the command line for the transform function seems to > > > > indicate > > > > that this option is not available. I'm in Euclidean space, which the > > > manual > > > > says is the only space it works in. > > > > > > > > If anyone could offer any help, that would be great. > > > > > > > > Cheers, > > > > > > > > Qi > > > > > > > > > > > > > > > > > > > > > |