0 Replies Latest reply on Sep 6, 2012 3:14 AM by flexlisto

    Problems Drawing Curved 3D Shapes with FB4

    flexlisto

      I'm trying to make a 3d curved rectangle. I've been following a very interesting tutorial on how to make squares, rectangles, etc:
      http://blog.leeburrows.com/2010/11/drawtriangles3/
      The problem I have is that I need the rectangle is a curved surface (as if it were a sheet of paper tight on the sides, in the form of U).

      In the tutorial I mentioned earlier, is shown as the rectangle assigned points as follows:

      var points: Vector. <Vector3D> = new Vector. <Vector3D>;
      points.push (new Vector3D (-w2,-h2,-d2));
      points.push (new Vector3D (w2,-h2,-d2));
      points.push (new Vector3D (w2, h2,-d2));
      points.push (new Vector3D (-w2, h2,-d2));

      points.push (new Vector3D (-w2,-h2, d2));
      points.push (new Vector3D (w2,-h2, d2));
      points.push (new Vector3D (w2, h2, d2));
      points.push (new Vector3D (-w2, h2, d2));

      My idea is to assign more points to create the curved shape, but it does not work because it is cut from all sides. I've been testing the following:

      var points: Vector. <Vector3D> = new Vector. <Vector3D>;
      points.push (new Vector3D (-w2,-h2,-d2));
      points.push (new Vector3D (-w2 +10,-h2-10,-d2));
      ...
      points.push (new Vector3D (w2,-h2,-d2));
      points.push (new Vector3D (w2, h2,-d2));
      points.push (new Vector3D (w2-10, H2-10,-d2));
      ...
      points.push (new Vector3D (-w2, h2,-d2));

      ...

      Some of you could help me solve the problem?

       

      Thanks.