Painless way to do 3D visualization

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Peter Beattie

    #1

    Painless way to do 3D visualization

    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
  • faulkner

    #2
    Re: Painless way to do 3D visualization



    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

    Comment

    • Peter Beattie

      #3
      Re: Painless way to do 3D visualization

      faulkner wrote: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

      Comment

      • Ron Adam

        #4
        Re: Painless way to do 3D visualization

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







        from visual import *

        # a simple polygon

        points = [(0,0,0),(0,1,0) ,(1,1,0),(1,0,0 ),(0,0,0)]
        curve(pos=point s, 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(poin ts)-1):
        curve(frame=squ are2, pos=[points[i],points[i+1]], color=color.blu e)
        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.obj ects[0])


        Comment

        • Erik Max Francis

          #5
          Re: Painless way to do 3D visualization

          Peter Beattie wrote:
          faulkner wrote:>
          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:



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

          --
          Erik Max Francis && max@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

          Comment

          Working...