Question Generate 3d image from 3 picture boxes?

learnerguy

Member
Joined
Jul 28, 2013
Messages
20
Programming Experience
Beginner
Hi Everyone,

So I have a bit of a problem I am unsure how to address.
My goal is to create a 3d image for a product using 3 images one for the top one for the middle and one for the side.
I can generate the image as a flat image but I want to render it like a product box. Is there a way to do this with GDI+ in vb.net?

I tried to find some tutorials but what I found was for like stereoscopic graphics which is not what I am requiring.
any help would be greatly appreciated
have a great day
-Learnerguy
 
Thanks

Hi John,
Thanks for the link I tried doing the following to no avail
VB.NET:
  Private Sub DrawImagePara(ByVal e As PaintEventArgs)        ' Create image.
        Dim newimage As Image = Image.FromFile(Panel1.Height, Panel1.Width)
        ' Create parallelogram for drawing image.
        Dim picturebox1 As New Point(100, 100)
        Dim picturebox2 As New Point(550, 100)
        Dim picturebox3 As New Point(150, 250)
        Dim destPara As Point() = {picturebox1, picturebox2, picturebox3}


        ' Draw image to screen.
        e.Graphics.DrawImage(newimage, Panel2.ClientRectangle)


    End Sub
Trying to grab the images from 3 pictureboxes and render it like a product box but it is not cooperating:(
Any idea what I am doing wrong here?
Thanks
-Learnerguy
 
Any idea what I am doing wrong here?
Second argument to the method I suggested is a Point array, not a Rectangle.
 
Hi John

Second argument to the method I suggested is a Point array, not a Rectangle.

O.K. so I have tried painting it to the screen, painting it to the panel etc I can't seem to understand the plotting I suppose All it does is draw an error image. doesn't matter what I try
Looking at the example it seems simple tell the program where to draw the image at what point using what image. As I posted I tried using the 3 picture boxes as new points and then drawing it to the 2nd panel rectangle but I am very new to this and obviously am not getting the fix. When I make the image from the panel with the pictureboxes , I am not understanding why it is not drawing that instead of an error image.

-Learnerguy
 
Use the Paint event of some control or form and use the DrawImage method to draw your three images, for each DrawImage call you specify a parallelogram with the array consisting of three Point values.
I don't understand your error image, just use any image until you get hang of it.
 
Hi John

Ok I think I got it the par is for each image ok I will try it out I didn't understand the error image either. thanks John for taing time to help me
-Learnerguy
 
Back
Top