I have the co-ordinates of a rectangle. How can I draw a cube with this in C#?
graphics.drawRectangle(Pens.Black, x, y, width, height);
Rectangle has four co-ordinates but a cube has 8 co-ordinates. How can I locate the other four points of the rectangle to make it look like a cube.
When drawing a cube by hand from a rectangle, we need three-dimensions length X width X height. We will use an angle of 60 to 70 degree (approx) from X axis to draw z-axis and it will look like 3D. Similarly, we can draw length dimension for the rectangle and locate the point (x',y') for second rectangle. We will use the same height and width for the second rectangle and joining the two rectangles will give the cube.
I'm trying to do this in C#. To do this I need a co-ordinate of the second rectangle which is at an arbitrary distance (say 50) at an angle of 70 degree (approx) from (x, y) of first rectangle