3D Vector Type Line-Drawing Program

3D Vector Type Line-Drawing Program

Post by James Stro » Wed, 11 Oct 2006 08:36:32


Hello All,

I'm looking for a program to do line-drawings in 3d, with output to
postscript or svg or pdf, etc. I would like to describe a scene with
certain 1-3d elements oriented in 3d space with dashed or colored lines
and filled or transparent surfaces (or maybe semitransparent).

I would then like to set the camera and have the scene depicted as a
line drawing (not ray-traced solid body, etc).

Does anyone know of a library to do this?

James


James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.yqcomputer.com/
 
 
 

3D Vector Type Line-Drawing Program

Post by James Stro » Wed, 11 Oct 2006 08:46:30


I'm really looking for a python library. The title of the post is kind
of misleading.

James


--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.yqcomputer.com/

 
 
 

3D Vector Type Line-Drawing Program

Post by Scott Davi » Wed, 11 Oct 2006 13:21:19


Take a look at VPython -- easy to start, 3-D display (wall-eye /
cross-eye) easy to run on.

--
--Scott David Daniels
XXXX@XXXXX.COM
 
 
 

3D Vector Type Line-Drawing Program

Post by Mike C. Fl » Thu, 12 Oct 2006 07:03:06


At one point I created a gl2ps wrapper for use with PyOpenGL, that,
combined with any of the PyOpenGL-based renderers would allow much of
what you're describing, though IIRC it didn't properly support
transparent or textured surfaces. You could probably recreate the
wrapper using ctypes in a few hours and then hook it up in a few more.

I believe there are similar OpenGL-to-SVG libraries here and there, you
could likely hook one of them up to get a reasonable result that would
support more graphics features (maybe). Generally what you get out of
these things, however, is a quite fragmented view of your objects (that
is, you get the triangles that would be rendered). That *can* be coded
around, but generally people are either focused on making it look good
or making it editable.

Good luck,
Mike

--
________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.yqcomputer.com/
http://www.yqcomputer.com/
 
 
 

3D Vector Type Line-Drawing Program

Post by Ron Ada » Thu, 12 Oct 2006 11:16:17


I really like VPython because of how easy it is to use once you are familiar
with it.

Is there a way to have the display show a wire frame image instead of shaded
shapes? And with or without hidden line removal?

Is there an easy way to convert a display to something that can be printed?

Cheers,
Ron
 
 
 

3D Vector Type Line-Drawing Program

Post by nelson » Thu, 12 Oct 2006 16:53:01

hi,



i'm goind the same. I looked to vpython, but i can't make it go with
wxpython. So i make a slightly different question. There is a library
that fits well with wxpython that have features similar to vpython?

thanks,
nelson
 
 
 

3D Vector Type Line-Drawing Program

Post by Scott Davi » Fri, 13 Oct 2006 02:40:39


You can draw the edges as lines.

> And with or without hidden line removal?
Not that I know of. The distinction would be whether you actually build
the objects. Certainly for something like this you would be working
with something like a "faces" object rather than a fully 3-D object.


You can generate POV-ray source. This is not a system for creating
beautiful pictures, but rather a great 3-D sketch pad.


--Scott David Daniels
XXXX@XXXXX.COM
 
 
 

3D Vector Type Line-Drawing Program

Post by Ron Ada » Sat, 14 Oct 2006 07:26:45


Is there a setting for this?, or are you suggesting reading the coordinates and
creating curve objects for the edges?



Doing a little googling found this...

http://www.yqcomputer.com/


Still most of the items listed here are geared more towards 3d animation or for
generating displays and are not ideal for generating high quality printed pages.

_Ron
 
 
 

3D Vector Type Line-Drawing Program

Post by Scott Davi » Sat, 14 Oct 2006 08:26:11


Nope, you'd have to make a poly line which was the wire frame, but it
would then rotate and such with the rest of the model. Essentially
you would, for each primitive, have a wire-frame and a volumetric
version, and keep one of the two visible (with the other invisible)
at all times.


Now POV-ray _will_ create beautiful pictures, but the texturing,
shading, and lighting control that POV-ray gives you exceeds that
of VPython. You could use VPython to get you model built and view-
point placed, and the tweak the POV-ray code to get pretty output.

--Scott David Daniels
XXXX@XXXXX.COM
 
 
 

3D Vector Type Line-Drawing Program

Post by Fabian Bra » Sat, 14 Oct 2006 18:08:31

Hi,

I am not sure, if that is, what your looking for, but
with 'salome' you able to produce 3D drawings with an GUI or
using a python script. Take a look at:

http://www.yqcomputer.com/






Greetings!
Fabian
 
 
 

3D Vector Type Line-Drawing Program

Post by Kjell Magn » Sat, 14 Oct 2006 20:22:35

> I'm looking for a program to do line-drawings in 3d, with output to

For high quality line drawings using Python you have PyX [1].
Unfortunately it does not come with a 3D library. You probably have too
look elsewere for 3D vector drawings. Some places to look are:

- Asymptote [2]
- Sketch [3]. A small, simple system for producing line drawings of
two- or three-dimensional solid objects and scenes. Sketch generates
PSTricks code for LaTeX.

Both Asymptote and Sketch requires TeX/LaTeX for typesetting labels and
such. Sketch is probably the closest to what you are looking for. See
[4] for an example of what kind of graphics it can create.

[1] http://www.yqcomputer.com/
[2] http://www.yqcomputer.com/
[3] http://www.yqcomputer.com/ ~eugene.ressler/
[4] http://www.yqcomputer.com/

Regards,
Kjell Magne Fauske