I want to render to a 3d House(barn) . I wrote the following code.But its creating only front side with a triangle and a rectangle.It is not creating a thacthed house.What modifications should I make
There are rules to follow when creating polygons.
First, all points of a single polygon must lay on a single plain. Thats why triangles are so often used, because any 3 points will always lay on a single plain.
Second, all points must be plotted either clockwise or counterclockwise, depending on which left/right hand rule you are using.
Lastly, this is a little hard to explain, you can not create concave polygons. If there is a point in your polygon that may lay inside of subsequent point, it will be skipped. Odd results can occure from concave polygons.
Anywho, that’s my two cents.