3D Vector Type Line-Drawing Program

J

James Stroud

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.jamesstroud.com/
 
J

James Stroud

James said:
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?


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.jamesstroud.com/
 
S

Scott David Daniels

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

Mike C. Fletcher

James said:
I'm really looking for a python library. The title of the post is kind
of misleading.
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.vrplumber.com
http://blog.vrplumber.com
 
R

Ron Adam

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

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
 
N

nelson -

hi,

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?

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
 
S

Scott David Daniels

Ron said:
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?
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.
Is there an easy way to convert a display to something that can be printed?

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
(e-mail address removed)
 
R

Ron Adam

Scott said:
You can draw the edges as lines.

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

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

Doing a little googling found this...

http://cgkit.sourceforge.net/index.html


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
 
S

Scott David Daniels

Ron said:
Is there a setting for this?, or are you suggesting reading the
coordinates and creating curve objects for the edges?
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
(e-mail address removed)
 
F

Fabian Braennstroem

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.salome-platform.org/home/presentation/geom/

* Scott David Daniels said:
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
(e-mail address removed)

Greetings!
Fabian
 
K

Kjell Magne Fauske

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).

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://pyx.sourceforge.net/
[2] http://asymptote.sourceforge.net/
[3] http://www.frontiernet.net/~eugene.ressler/
[4] http://www.fauskes.net/nb/threedill/

Regards,
Kjell Magne Fauske
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top