  C RUBY-ON-RAILS MYSQL ASP.NET DEVELOPMENT RUBY .NET LINUX SQL-SERVER REGEX WINDOWS ALGORITHM ECLIPSE VISUAL-STUDIO STRING SVN PERFORMANCE APACHE-FLEX UNIT-TESTING SECURITY LINQ UNIX MATH EMAIL OOP LANGUAGE-AGNOSTIC VB6 MSBUILD # Draw Triangles with help of Polygon in java  » java » Draw Triangles with help of Polygon in java

By : user2952283
Date : November 19 2020, 12:41 AM
I wish this helpful for you I want to draw 3 triangles like this I am trying but not getting what i want. any one can help , Here is the Code code :
``````        triangle1 = new Polygon();
triangle2 = new Polygon();
triangle3 = new Polygon();
`````` ## How to draw a image as a texture of a polygon and how to rotate the polygon in all directions touching the polygon on th

By : user3601046
Date : March 29 2020, 07:55 AM
hop of those help? As you are using opengl es, there is a function called glrotate which is used to rotate the object. here is the link
http://www.khronos.org/opengles/sdk/1.1/docs/man/glRotate.xml ## JAVA draw regular polygon

By : Tarek Zmerli
Date : March 29 2020, 07:55 AM
I wish did fix the issue. I am looking for an algorithm to draw regular polygon like triangle, quadrangle, pentagon, hexagon etc. , Use sin and cos:
code :
``````double theta = 2 * Math.PI / sides;
for (int i = 0; i < sides; ++i) {
double x = Math.cos(theta * i);
double y = Math.sin(theta * i);
// etc...
}
`````` ## Filling in Triangles in Dr.Java using standard draw

By : Hendriktio Freizello
Date : March 29 2020, 07:55 AM
I wish this helpful for you Found stdDraw online. This should do what you need. The key to this is to understand that the order of the coords matter. For example, xc and y compose one point, and so on.
code :
``````//club
double[] xc = {-.7,-.75,-.65};
double[] yc = {.7,.65,.65};
StdDraw.filledPolygon(xc,yc);

double[] xs1 = {-.7,-.75,-.65};
double[] ys1 = {-.8,-.85,-.85};
StdDraw.filledPolygon(xs1,ys1);
`````` ## How to draw triangles that connect with a square in java

By : Piotr Szymczyk
Date : March 29 2020, 07:55 AM
seems to work fine you must use the g.drawPolygon(int[] xPoints, int[] yPoints, int nPoints) method to make triangles with swing.
code :
``````    int xPoly[] = {60, 140, 100};
int yPoly[] = {60, 60, 30};

poly = new Polygon(xPoly, yPoly, xPoly.length);

g.drawPolygon(poly);
`````` ## Is it possible to draw lines and triangles in a single draw call in OpenGL?

By : Dravon Rush
Date : March 29 2020, 07:55 AM
this will help
Is it possible to draw both lines and triangles in single draw call in a case like this? 