Αποτελέσματα Αναζήτησης
/** creates a regular polygon with the specified number /* of sides, length of side, and x- and y-coordinates */ RegularPolygon(int newN, double newSide, double newX, double newY) {
The formula for computing the area of a regular polygon is * Area=n s24 tan (n). * <p> * Draw the UML diagram for the class and then implement the class. * <p> * Write a test program that creates three RegularPolygon objects, * created using the no-arg constructor, using RegularPolygon (6, 4), * and using RegularPolygon (10, 4, 5.6, 7.8).
/* (Geometry: area of a regular polygon) A regular polygon is an n-sided polygon in which all sides are of the same length and all angles have the same degree (i.e., the polygon is both equilateral and equiangular).
16 Δεκ 2012 · In order to turn your polygon by X degrees, convert X to radians, and add the result to the angle in the formula, like this: (2*Math.PI*K)/N + Xrad. Finally, since the origin of the screen is in one of the corners, only a portion of your polygon is going to be visible.
6 Φεβ 2014 · int[] xValues = {center, (int)x1, (int)x2, (int)x3}; int[] yValues = {center, (int)y1, (int)y2, (int)y3}; Polygon squa = new Polygon(xValues, yValues,4); g2d.drawPolygon(squa); if(item==5) g2d.setColor(Color.GREEN); for(int i=0;i<amount;i++){. Polygon pent = new Polygon(); for (int i = 0; i < 5; i++)
16 Απρ 2014 · The goal of this code golf is to draw a regular polygon (one with equal side lengths) given the number of sides and radius (distance from center to vertex). The number of sides and the radius can be entered via a file, STDIN, or just a plain old variable. Use whatever is shorter in your language.
(Geometry: area of a regular polygon) A regular polygon is an n-sided polygon in which all sides are of the same length and all angles have the same degree (i.e., the polygon is both equilateral and equiangular).