Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
polygon
- Page 1
Re: Polygon Clipping
Programming
Software Development
12 Years Ago
by Taywin
…determining whether the check is now inside a
polygon
if all points of origPolygon are inside …copy of all origPolygon points // the
polygon
is inside clip
polygon
end if if all points of … true // flag starting (could use size of result
polygon
as well) end if lastPtOPolygon <- currPtOPolygon end …
Re: Polygon Clipping
Programming
Software Development
12 Years Ago
by Taywin
… return a copy of all origPolygon points // the
polygon
is inside clip
polygon
end if if all points of clipPolygon are inside… return result end if On a side note: 1. the
polygon
should not add an edge which is already exists in…
Re: Polygon Clipping
Programming
Software Development
12 Years Ago
by Taywin
…;I've realized that it is an advantage if the
polygon
is convex. You don't need to determine if a… the inside direction. You said it. ;) Actually clipping a concave
polygon
(with either a convex or concave) can result in **more… reason to test whether a point is in a
polygon
. Whether the
polygon
is convex or concave, all you have to do…
Re: Polygon Clipping
Programming
Software Development
12 Years Ago
by Taywin
…gt;That would work just as well for a concave
polygon
as a convex
polygon
. Not really. The test for a point inside… about given a convex (rectangle) to clip with *a
polygon
*. The
polygon
is not necessary to be a rectangle. Seeing picture from… the attached image, I would assume that the other
polygon
must be a convex. @wtosh, it will be quite …
Re: Polygon Clipping
Programming
Software Development
12 Years Ago
by bguild
… direction. Instead of using two `float[]` arrays to represent the
polygon
, I would use a list of `java.awt.geom.Point2D… make use of a method that takes an Intersect, the
polygon
, and the rectangle and returns an instance of a private… the outline of the rectangle and then iterating through the
polygon
to see how many times the *other* edges of the…
Re: Polygon Clipping
Programming
Software Development
12 Years Ago
by Taywin
…the Cx,y is a part of new
polygon
(clipped
polygon
). 3.2 else the line created by Cx… or outside. You NEED to know what your
polygon
looks like. I believe that this assignment is… only convex polygons to be clipped. If the
polygon
is a convex, you will need to test… the point with all
polygon
edges and determine that it is result in …
Polygon Clipping
Programming
Software Development
12 Years Ago
by wtosh
… * */ public class clipper { /** * clipPolygon * * Clip the
polygon
with vertex count in and vertices inx/iny * against the… * * @return number of vertices in the
polygon
resulting after clipping * */ public float intersectX; …
Re: Polygon Clipping
Programming
Software Development
12 Years Ago
by bguild
… convex is a red herring when you are clipping a
polygon
to a rectangle. Being convex is helpful for determining if… and simply iterate over the edges and vertices of the
polygon
, checking and clipping each in turn. That would work just…
Re: Polygon Clipping
Programming
Software Development
12 Years Ago
by bguild
… no reason to test whether a point is in a
polygon
. All you need to do is test for points inside… rectangle, but surely that's not very useful. Whether the
polygon
is convex or concave, all you have to do is… to connect the new vertices that you create when the
polygon
comes back to the rectangle.
Polygon' does not contain a constructor that takes '1' arguments (CS1729)
Programming
Software Development
14 Years Ago
by Stefano Mtangoo
… I'm confused. Thanks using System; [CODE=C#]class
Polygon
{ string polygonName;
Polygon
(string pName){ polygonName = pName; } public string getName(){ …return polygonName; } } class MainClass{ public static void Main(){
Polygon
pg = new
Polygon
("Iam a Triangle"); Console.WriteLine(pg.getName…
Re: Polygon Clipping
Programming
Software Development
12 Years Ago
by bguild
…. The Intersects will come already sorted, but depending on the
polygon
they may be going clockwise or counterclockwise. So I would… reverse everything: reverse the order of the vertices of the
polygon
, reverse the order of the Intersects, turn every inward Intersect…
Re: Polygon Clipping
Programming
Software Development
12 Years Ago
by wtosh
What am I doing wrong? I can't seem to get it clip the
polygon
at all.
Re: Polygon Clipping
Programming
Software Development
12 Years Ago
by Taywin
For testing a point in a convex
polygon
(triangle), it explains how to test and derive the algorithm equation to be much simplier. For intersection point, the person explains how to find it (somewhat algorithm).
Polygon Program
Programming
Software Development
20 Years Ago
by JustinsCJ5
… supposed to let the user input how many vertices the
polygon
will have, then let them put in the vertices, calculate… program i should ask the user how many vertices the
polygon
will have, then i have to use a loop and…
Polygon formula [for graphics]
Programming
Software Development
16 Years Ago
by Alex_
…. I want to make a function that will draw a
polygon
, depending on how many vertex's it has. I'm…
Re: Polygon formula [for graphics]
Programming
Software Development
16 Years Ago
by Alibeg
double pass2 = a; //where a is angle between line (first point of
polygon
joined with centre of
polygon
) and x axis.....you might like to set pass2 to 0 in the beginning while(k<n*2) { poly[k++]=x +r * cos(pass2); poly[k++]=y +r * sin(pass2); pass2 += pass; } this is how it goes i think
Re: Polygon formula [for graphics]
Programming
Software Development
16 Years Ago
by Alex_
… ! But not really.. This is what i wrote [code] void
polygon
(int x, int y, int n, int r){ int k…
Re: Polygon formula [for graphics]
Programming
Software Development
16 Years Ago
by Alex_
tried some modifications [code=c++]void
polygon
(int x, int y, int n, int r){ int k=…
file polygon.h
Programming
Software Development
16 Years Ago
by roidel
…",lokasiTembok[0],lokasiTembok[1]); // tembok yang kena vector tembok =
polygon
[lokasiTembok[0]].getLine(lokasiTembok[1]); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** cari titik pantul */ vektor titikPantul…
Class Polygon c++
Programming
Software Development
12 Years Ago
by coutnoob
…); int getEdge(int k); }; #endif
polygon
.cpp #include "
polygon
.h"
Polygon
::
Polygon
() { size=0; }
Polygon
::~
Polygon
() { delete [] len; }
Polygon
::
Polygon
(int k,int *l) { size=k…
Draw polygon help
Programming
Software Development
13 Years Ago
by xcrypted1
…paintComponent(Graphics g) { Graphics2D g2 = (Graphics2D) g;
Polygon
square = new
Polygon
(); square.add(new Point2D.Double(100, 100)); square.add…add(new Point2D.Double(150, 100)); square.draw(g2);
Polygon
pentagon = new
Polygon
(); double centerX = 200; double centerY = 200; …
Re: Class Polygon c++
Programming
Software Development
12 Years Ago
by VernonDozier
… sides are equal. I imagine it would inherit everything that
polygon
has, plus add a constructor taking a length and a…
Re: Class Polygon c++
Programming
Software Development
12 Years Ago
by Kanoisa
… constructor will need a different number of arguments for each
polygon
type. One option is to take from printf or iostream… the interface class generic and expandable (im assuming thats what
polygon
will be ) Maybe its a push to far but i…
Area of a Polygon
Programming
Software Development
16 Years Ago
by smoore
…The choices are line, circle, ellipse, rectangle, and
polygon
. When the user selects a shape they are then asked…showing here is a modified version with just the
polygon
class and a main area where you can …= new JFrame("This is a
Polygon
"); frame.setSize(500,500);
Polygon
p = new
Polygon
(name, xPoints, yPoints, numOfPoints); frame…
Re: flipping polygon of polygons
Programming
Software Development
12 Years Ago
by ashsha
…edit I tried this: for (
Polygon
p : polygonList) {
Polygon
tempP = new
Polygon
(p.xpoints, p.ypoints, p.…, endY); polygonListMirror.add(pM); tempP = new
Polygon
(); } public
Polygon
move(
Polygon
p, double xMove, double yMove) { // Change…
Re: Inside edge of a polygon
Programming
Software Development
8 Years Ago
by Jeff-Bennett
…standpoint - the concept is called "Erosion of a
polygon
" and is not as simple as one would …of vertices of the inner edges of the thickly drawn
polygon
. As per "AssertNull 292" I am thinking…drawn line - so perpandicular distance from the original
polygon
to the internal
polygon
. Note - it is very easy for a rectangle…
flipping polygon of polygons
Programming
Software Development
12 Years Ago
by ashsha
… of it vertically. I know the points of the outside
polygon
and I have an ArrayList for the inner polygons. I… was able to flip the outside
polygon
. but how do I flipped the inner polygons keeping their… the new one? I know the center of the outside
polygon
and the flipped version. Imagine that you are playing cards…
Re: Draw polygon help
Programming
Software Development
13 Years Ago
by NormR1
Did you look at other methods that might be useful? [QUOTE]Draw the
polygon
by joining adjacent points with a line,[/QUOTE] I referred to drawing lines earlier. What is in the ArrayList?
Re: Draw polygon help
Programming
Software Development
13 Years Ago
by xcrypted1
… is only my second month learning Java. My square and
polygon
are now drawing like they should, except, the start and…
Re: flipping polygon of polygons
Programming
Software Development
12 Years Ago
by Taywin
…use the center point as origin point for the inner
polygon
in order to transform points before rotation. /* The… rotation/mirror method can directly be applied to the inner
polygon
. +---------+ | +---+ | | | | | | +---+ | +---------+ The polygons below are not sharing the …
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC