Posted: Mon Jan 05, 2009 7:23 pm Post subject: Game Help (Triangles)
Just wondering if anyone knew of a way to draw triangles in Turing, I can't seem to find a way myself.
I need it for this:
Sponsor Sponsor
Insectoid
Posted: Mon Jan 05, 2009 7:25 pm Post subject: RE:Game Help (Triangles)
Do you know how to draw lines? Then you can draw a triangle. Write a function to draw a triangle even. I see dozens of triangles already drawn on your picture.
Laplace's Demon
Posted: Mon Jan 05, 2009 7:28 pm Post subject: Re: Game Help (Triangles)
You have to use Draw.Polygon or Draw.FillPolygon.
Go check them out in the turing reference, basically you just create arrays which store multiple x and y values into a single variable, and use those arrays to create any number of points. In your case you will want to use 3 different points.
EDIT: You could just use lines if you only want to create an outline, but if you want to create different colors inside the triangle you will want to use the Draw.FillPolygon procedure.
Spence607
Posted: Mon Jan 05, 2009 7:35 pm Post subject: Re: RE:Game Help (Triangles)
insectoid @ Mon Jan 05, 2009 7:25 pm wrote:
Do you know how to draw lines? Then you can draw a triangle. Write a function to draw a triangle even. I see dozens of triangles already drawn on your picture.
Yes, I could use lines, but then to fill in the triangle I would also have to use lines, which would take forever, and alright Laplace's Demon, I'll check out Polygon's.
Insectoid
Posted: Mon Jan 05, 2009 7:45 pm Post subject: RE:Game Help (Triangles)
Spence, you could use Draw.Fill to fill in the triangle. But then, Draw.Polygon would work better.
Spence607
Posted: Mon Jan 05, 2009 7:52 pm Post subject: Re: Game Help (Triangles)
Polygons rule! Thanks for the help.
corriep
Posted: Tue Jan 06, 2009 9:35 pm Post subject: RE:Game Help (Triangles)