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

Painless way to do 3D visualization

P: n/a
Hey folks,

I need to do the following relatively simple 3D programming:

I want to convert data from four-item tuples into 3D co-ordinates in a
regular tetrahedron. Co-ordinates come in sequences of 10 to 20, and the
individual dots in the tetrahedron need to be connected into
discontinuous lines. A single tetrahedron should contain at least two,
possibly more, such lines. I would like to show certain similarities in
the sequences/lines, eg by changing color, thickness, or maybe attaching
indeces to certain points in a particular sequence.

I'd welcome suggestions as to what might be the most painless way to
achieve this in Python. So far, I've only tinkered a little with
VPython, but the lack of any decent documentation has proved to be a
major turn-off.

TIA!

--
Peter
Oct 7 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
http://www.vpython.org/

Peter Beattie wrote:
Hey folks,

I need to do the following relatively simple 3D programming:

I want to convert data from four-item tuples into 3D co-ordinates in a
regular tetrahedron. Co-ordinates come in sequences of 10 to 20, and the
individual dots in the tetrahedron need to be connected into
discontinuous lines. A single tetrahedron should contain at least two,
possibly more, such lines. I would like to show certain similarities in
the sequences/lines, eg by changing color, thickness, or maybe attaching
indeces to certain points in a particular sequence.

I'd welcome suggestions as to what might be the most painless way to
achieve this in Python. So far, I've only tinkered a little with
VPython, but the lack of any decent documentation has proved to be a
major turn-off.

TIA!

--
Peter
Oct 7 '06 #2

P: n/a
faulkner wrote:
http://www.vpython.org/
Oh, thanks, but let me quote myself:
>So far, I've only tinkered a little with VPython, but the lack
of any decent documentation has proved to be a major turn-off.
So, I'd really appreciate any hints as to where to look for anything a
little more usable.

--
Peter
Oct 8 '06 #3

P: n/a
Peter Beattie wrote:
Hey folks,

I need to do the following relatively simple 3D programming:

I want to convert data from four-item tuples into 3D co-ordinates in a
regular tetrahedron. Co-ordinates come in sequences of 10 to 20, and the
individual dots in the tetrahedron need to be connected into
discontinuous lines. A single tetrahedron should contain at least two,
possibly more, such lines. I would like to show certain similarities in
the sequences/lines, eg by changing color, thickness, or maybe attaching
indeces to certain points in a particular sequence.

I'd welcome suggestions as to what might be the most painless way to
achieve this in Python. So far, I've only tinkered a little with
VPython, but the lack of any decent documentation has proved to be a
major turn-off.

TIA!
What exactly are the four-items in the tuples?
I think this is what you need along with an example...
http://www.vpython.org/webdoc/visual/curve.html


from visual import *

# a simple polygon

points = [(0,0,0),(0,1,0),(1,1,0),(1,0,0),(0,0,0)]
curve(pos=points, color=color.red)
# a polygon as separate segments grouped together in a frame.

square2 = frame()
points = [(0,0,1),(0,1,1),(1,1,1),(1,0,1),(0,0,1)]
for i in xrange(len(points)-1):
curve(frame=square2, pos=[points[i],points[i+1]], color=color.blue)
square2.objects[2].color = color.green # change a line segments color
square2.objects[2].radius = .02 # change a line segments thickness
# looking at objects after they are made.
print square2
print dir(square2)
print square2.objects
print dir(square2.objects[0])
Oct 8 '06 #4

P: n/a
Peter Beattie wrote:
faulkner wrote:
>http://www.vpython.org/

Oh, thanks, but let me quote myself:
>>So far, I've only tinkered a little with VPython, but the lack
of any decent documentation has proved to be a major turn-off.

So, I'd really appreciate any hints as to where to look for anything a
little more usable.
There's also ZOE:

http://www.alcyone.com/software/zoe/

but if a lack of documentation turned you off to VPython then ZOE is
probably not for you either.

--
Erik Max Francis && ma*@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis
No need to tell her there's a world out there / She knows / She just
doesn't seem worried at all -- Nik Kershaw
Oct 8 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.