By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,427 Members | 1,378 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,427 IT Pros & Developers. It's quick & easy.

3D Vector Type Line-Drawing Program

P: n/a
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/
Oct 9 '06 #1
Share this Question
Share on Google+
10 Replies


P: n/a
James Stroud wrote:
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/
Oct 9 '06 #2

P: n/a
James Stroud wrote:
>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).

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

--
--Scott David Daniels
sc***********@acm.org
Oct 10 '06 #3

P: n/a
James Stroud wrote:
James Stroud wrote:
>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.
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

Oct 11 '06 #4

P: n/a
Scott David Daniels wrote:
James Stroud wrote:
>>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).


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
Oct 11 '06 #5

P: n/a
hi,

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?
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
Oct 11 '06 #6

P: n/a
Ron Adam wrote:
Scott David Daniels wrote:
>James Stroud wrote:
>>>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).


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?
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
sc***********@acm.org
Oct 11 '06 #7

P: n/a
Scott David Daniels wrote:
Ron Adam wrote:
>Scott David Daniels wrote:
>>James Stroud wrote:
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).
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?
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?

>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.
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
Oct 12 '06 #8

P: n/a
Ron Adam wrote:
Scott David Daniels wrote:
>Ron Adam wrote:
>>... Is there a way to have the display show a wire frame image instead of
shaded shapes?
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?
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.
>>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.
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
sc***********@acm.org
Oct 12 '06 #9

P: n/a
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 <sc***********@acm.orgwrote:
Ron Adam wrote:
>Scott David Daniels wrote:
>>Ron Adam wrote:
... Is there a way to have the display show a wire frame image instead of
shaded shapes?
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?
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.
>>>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.

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
sc***********@acm.org
--
http://mail.python.org/mailman/listinfo/python-list
Greetings!
Fabian

Oct 13 '06 #10

P: n/a
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

Oct 13 '06 #11

This discussion thread is closed

Replies have been disabled for this discussion.