Partage
  • Partager sur Facebook
  • Partager sur Twitter

Interface 3D avec python 3

Sujet résolu
    27 février 2016 à 15:50:18

    Bonjour à tous,

    Je cherche à faire une interface 3D avec python 3 (toutes les bibliothèques que j'ai trouvées ne sont pas compatibles avec python 3). Qu'est ce que vous utilisez et conseillez ?

    Merci :)

    • Partager sur Facebook
    • Partager sur Twitter
      27 février 2016 à 16:19:00

      Salut

      Tu devrais donner des détails. C'est pour pour un jeu en 3D ?

      Panda3D semble compatible avec Python 3 depuis la version 1.9

      Kivy est compatible depuis la version 1.8 (pas les outils de build).

      • Partager sur Facebook
      • Partager sur Twitter
      Anonyme
        27 février 2016 à 16:24:37

        VPython ? Ca marche en Python 3.3, j'ai même fait un minecraft like avec :p
        • Partager sur Facebook
        • Partager sur Twitter
          27 février 2016 à 18:37:33

          Alors pour donner plus de détails, j'ai en ce moment python3.4. Je cherche simplement à afficher des sphères dans un espace 3D, avec lumières et textures. C'est pour faire de la prog scientifique. Je ne suis pas parvenu à installer vpython pour python3. Merci tsez, je vais me pencher sur panda3D. Des avis sur openscenegraph ?
          • Partager sur Facebook
          • Partager sur Twitter
            28 février 2016 à 12:25:17

            Merci yaalval. Apparemment il n'y a pas encore de vpython directement pour python3 (voir). La seule solution est de travailler en python2 avec __future__, ce qui n'est pas exactement ce que je cherchais

            -
            Edité par turlukuku 28 février 2016 à 12:26:41

            • Partager sur Facebook
            • Partager sur Twitter
            Anonyme
              28 février 2016 à 15:06:03

              Hum, nan pas du tout. Tu dois te tromper car j'utilise VPython en Python 3.3 !
              C:\Windows\SysWOW64>py -3.3
              Python 3.3.5 (v3.3.5:62cf4e77f785, Mar  9 2014, 10:37:12) [MSC v.1600 32 bit (Intel)] on win32
              Type "help", "copyright", "credits" or "license" for more information.
              >>> import visual
              C:\Python33\lib\site-packages\vis\materials.py:70: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
                self.__setattr__(key, value)
              >>> help(visual)
              Help on package visual:
              
              NAME
                  visual
              
              PACKAGE CONTENTS
                  controls
                  factorial
                  filedialog
                  graph
                  text
                  visual_all
              
              CLASSES
                  builtins.object
                      cPolygon.Polygon
              
                  class Polygon(builtins.object)
                   |  Polygon - a type to represent a polygon. In this module a polygon is a
                   |  collection of contours, each contour may be normal or a hole inside
                   |  other contours.
                   |
                   |  The initialisation arguments may be:
                   |  - another Polygon instance which will be cloned, or
                   |  - the name of a file which will be read, or
                   |  - a sequence of points which will be used as the first contour.
                   |  A point is a sequence of two floats.
                   |
                   |  Operations on polygons:
                   |   & q:
                   |      intersection: a polygon with the area that is covered by both p and q
                   |   | q:
                   |      union: a polygon containing the area that is covered by p or q or both
                   |   - q:
                   |      difference: a polygon with the area of p that is not covered by q
                   |   + q:
                   |      sum: same as union
                   |   ^ q:
                   |      xor: a polygon with the area that is covered by exactly one of p and q
                   |  :len(p):
                   |      number of contours
                   |  :p[i]:
                   |      contour with index i, the same as p.contour(i), slicing is not yet
                   |      supported
                   |  :bool(p):
                   |      logical value is true, if there are any contours in p (contours may be
                   |      empty!)
                   |
                   |  Methods defined here:
                   |
                   |  __add__(...)
                   |      x.__add__(y) <==> x+y
                   |
                   |  __and__(...)
                   |      x.__and__(y) <==> x&y
                   |
              ^^ faut juste télécharger le .whl sur LFD :)
              • Partager sur Facebook
              • Partager sur Twitter

              Interface 3D avec python 3

              × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
              × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
              • Editeur
              • Markdown