Shaping Polygons

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

    #1

    Shaping Polygons

    Hi All,

    I am developing a application in VB 6.0. I need to plot a 3D mesh of
    quadrilateral and triangular polygons. I have this working OK in
    wireframe. The question I have is what is the easiest way to shade the
    polygons so that I can render the surface. Each polygon is defined by
    the coordinates in space of its corners. Initially I would be happy
    with a uniform shading (i.e. constant color) and that is really what I
    am asking for help with. However I would also like to eventually shade
    the polygons with a color graduation based on value of a parameter at
    each of the corners (i.e. to generate a contoured plot on the surface
    of the body) where the color represents the value at a particular
    point. Any comments on how this would be achieved would also be
    appreciated.

    Thanks,

    Steve
  • Steve Gerrard

    #2
    Re: Shaping Polygons


    "smjmitchel l" <smjmitchell@ya hoo.com> wrote in message
    news:de4b00ab.0 309182035.370c1 758@posting.goo gle.com...[color=blue]
    > Hi All,
    >
    > I am developing a application in VB 6.0. I need to plot a 3D mesh of
    > quadrilateral and triangular polygons. I have this working OK in
    > wireframe. The question I have is what is the easiest way to shade the
    > polygons so that I can render the surface. Each polygon is defined by
    > the coordinates in space of its corners. Initially I would be happy
    > with a uniform shading (i.e. constant color) and that is really what I
    > am asking for help with. However I would also like to eventually shade
    > the polygons with a color graduation based on value of a parameter at
    > each of the corners (i.e. to generate a contoured plot on the surface
    > of the body) where the color represents the value at a particular
    > point. Any comments on how this would be achieved would also be
    > appreciated.
    >
    > Thanks,
    >
    > Steve[/color]

    VB6 is not so strong on graphics. I think you really have only a few choices
    here:
    1. Use Windows API calls, such as FloodFill, passing the hDC (device context
    handle) from your form.
    2. Buy a graphics control. There must be dozens, some not too spendy, that
    could save lots of time.
    3. Bump up to VB.Net, which has most of the GDI built in, including a
    Graphics.FillPo lygon method.

    Steve G.



    Comment

    Working...