From: Michael Z. K. <mz...@an...> - 2001-07-16 04:34:39
Attachments:
vrmlexport.py
|
Everyone, Attached is a python module, based on povexport, which will export a VPython scene into VRML97 (2.0). Feel free to integrate this into the VPython package and/or post on the VPython webpage. Everything is implemented except convex objects, text, textures, lighting, and camera positions. Right now curves look like crap and I think I'll need to come up with some interpolation code. Arrows are currently implemented as cylinders and cones instead of boxes and pyramids. VRML has no primative for toruses (rings) but the code uses extrusions to make a torus (the only problem being rendering is slower since an extrusion is madup of a bunch of smaller shapes). Included in the file are routines to convert axis/angle rotations to quaternions (originally I was planning to implement them to combine rotations) and I have left them in there for future use. The code is call-compatible with povexport, if you pass an inc list to it it will ignore it (same with the Shadowless flag). The only thing you haev to cahnge is the import string from "import povexport" to "import vrmlexport" and the calling code from "povexport.export(..." to "vrmlexport.export(..." The code itself has been tested on a couple of the demos, the electromagnetic wave problem from 33-132 at CMU, and a VPython model of the G0 Detector being installed at Jefferson Lab (I wrote this myself and it included nested frames with rotations and was what I used to initially test my code). VRML can be easily imported to other 3D rendering software (and then back into povray, I think). Also VRML can be embedded in webpages which might be good for class webpages, etc. Cheers, Michael Katz-Hyman |
From: Michael Z. K. <mz...@an...> - 2001-07-16 05:06:07
|
One thing I forgot to mention is that the code currently does not support frame's with an axis other then the default. It will work but with unexpected results. Rotations are only supported with frames when rotating it's position, not its orientation. I am working on the solution. -Michael On Mon, 16 Jul 2001, Michael Zadok Katzhyman wrote: > Everyone, > > Attached is a python module, based on povexport, which will export a > VPython scene into VRML97 (2.0). Feel free to integrate this into the > VPython package and/or post on the VPython webpage. > > Everything is implemented except convex objects, text, textures, lighting, > and camera positions. Right now curves look like crap and I think I'll > need to come up with some interpolation code. Arrows are currently > implemented as cylinders and cones instead of boxes and pyramids. VRML > has no primative for toruses (rings) but the code uses extrusions to make > a torus (the only problem being rendering is slower since an extrusion is > madup of a bunch of smaller shapes). > > Included in the file are routines to convert axis/angle rotations to > quaternions (originally I was planning to implement them to combine > rotations) and I have left them in there for future use. > > The code is call-compatible with povexport, if you pass an inc list to it > it will ignore it (same with the Shadowless flag). The only thing you > haev to cahnge is the import string from "import povexport" to "import > vrmlexport" and the calling code from "povexport.export(..." to > "vrmlexport.export(..." > > The code itself has been tested on a couple of the demos, the > electromagnetic wave problem from 33-132 at CMU, and a VPython model of > the G0 Detector being installed at Jefferson Lab (I wrote this myself and > it included nested frames with rotations and was what I used to initially > test my code). > > VRML can be easily imported to other 3D rendering software > (and then back into povray, I think). Also VRML can be embedded in > webpages which might be good for class webpages, etc. > > Cheers, > Michael Katz-Hyman > |
From: ruth c. <rc...@an...> - 2001-07-16 14:52:47
|
Very cool! We'll definitely add it to the VPython website. What's a good VRML viewer for windows? I downloaded one at random (cortona) but find it somewhat unintuitive. Ruth Chabay --On Monday, July 16, 2001 12:34 AM -0400 Michael Zadok Katzhyman <mz...@an...> wrote: > Everyone, > > Attached is a python module, based on povexport, which will export a > VPython scene into VRML97 (2.0). Feel free to integrate this into the > VPython package and/or post on the VPython webpage. > > Everything is implemented except convex objects, text, textures, lighting, > and camera positions. Right now curves look like crap and I think I'll > need to come up with some interpolation code. Arrows are currently > implemented as cylinders and cones instead of boxes and pyramids. VRML > has no primative for toruses (rings) but the code uses extrusions to make > a torus (the only problem being rendering is slower since an extrusion is > madup of a bunch of smaller shapes). > > Included in the file are routines to convert axis/angle rotations to > quaternions (originally I was planning to implement them to combine > rotations) and I have left them in there for future use. > > The code is call-compatible with povexport, if you pass an inc list to it > it will ignore it (same with the Shadowless flag). The only thing you > haev to cahnge is the import string from "import povexport" to "import > vrmlexport" and the calling code from "povexport.export(..." to > "vrmlexport.export(..." > > The code itself has been tested on a couple of the demos, the > electromagnetic wave problem from 33-132 at CMU, and a VPython model of > the G0 Detector being installed at Jefferson Lab (I wrote this myself and > it included nested frames with rotations and was what I used to initially > test my code). > > VRML can be easily imported to other 3D rendering software > (and then back into povray, I think). Also VRML can be embedded in > webpages which might be good for class webpages, etc. > > Cheers, > Michael Katz-Hyman |
From: David A. <dm...@an...> - 2001-07-16 15:58:19
|
I've brought the Macintosh version on our Web site up to date. |
From: David A. <dm...@an...> - 2001-07-16 16:46:00
|
I've brought the Macintosh version on our Web site up to date. |