View Single Post
  #5  
Old 08-27-2011, 12:17 AM
Tricxta Tricxta is offline
The Muffin Man
Tricxta's Avatar
Join Date: Oct 2010
Location: Australia
Posts: 563
Tricxta is just really niceTricxta is just really nice
Not really,what you do is you plot the outline of the points you want:
Square example:
PHP Code:
temp.square={20,20,40,20,40,40,20,40};
showpoly (300temp.square); 
And this is how I drew it in order of verticies


Another example would be drawing a circle:
PHP Code:
temp.radius=4;
for (
temp.i=0;temp.i<(pi*2);temp.i++)temp.circle.add((cos(temp.i)*temp.radius+30),(sin(temp.i)*temp.radius+30));
showpoly (300temp.circle); 
So basically summing up, you draw the outline and the showpoly will fill in the middle. And basically what I've done here in both examples is define an array outside the showpoly statement rather then within it. Hope this helped.
Reply With Quote