# Search:

Type: Posts; User: wtosh

Page 1 of 2 1

## Search: Search took 0.20 seconds.

by wtosh
Replies
50
Views
2,134

### Re: Polygon Clipping Java, Help Please.

Do i need anything else besides this method?

by wtosh
Replies
50
Views
2,134

### Re: Polygon Clipping Java, Help Please.

http://i.imgur.com/f4ANQ.png

I think I will implement this design.

by wtosh
Replies
50
Views
2,134

### Re: Polygon Clipping Java, Help Please.

Uhhhh, I don't have one yet.

by wtosh
Replies
50
Views
2,134

### Re: Polygon Clipping Java, Help Please.

Using the compare method? I guess?

by wtosh
Replies
50
Views
2,134

### Re: Polygon Clipping Java, Help Please.

Yes, that is considered an edge.
If the edge is parallel to the clipping edge, it is unchanged.

---------- let's say this is a polygon edge. and +++++++++ this is the clipping edge.

Before...

by wtosh
Replies
50
Views
2,134

### Re: Polygon Clipping Java, Help Please.

A and B are both given, I think. THe objects on the left are the left part of a edge that is of the polygon. I don't know how will the clip line intersects the edge......

--- Update ---

"the...

by wtosh
Replies
50
Views
2,134

### Re: Polygon Clipping Java, Help Please.

A and B are both given, I think. THe objects on the left are the left part of a edge that is of the polygon. I don't know how will the clip line intersects the edge......

by wtosh
Replies
50
Views
2,134

### Re: Polygon Clipping Java, Help Please.

My thoughts are that:
check left edge first. start at A, checks if clip line intersect edge A to B.
if it does make new vertice, save new verticie to A. Check next edge.
Repeat progress if...

by wtosh
Replies
50
Views
2,134

### Re: Polygon Clipping Java, Help Please.

The part where you have to intersect the polygon and create the new vertices.
So let's say the polygon edge that needs to be clipped hits the other polygon.
2. Intersection happens.

How can I...

by wtosh
Replies
50
Views
2,134

by wtosh
Replies
50
Views
2,134

### Re: Polygon Clipping Java, Help Please.

I have a design, it's written in my notebook.

by wtosh
Replies
50
Views
2,134

### Re: Polygon Clipping Java, Help Please.

The ClipTest, extendedCanvas, simpleCanvas were all classes provided by my instructor. I am NOT to modify them. The class I am able to change is the clipper.java class which came empty with the zip...

by wtosh
Replies
50
Views
2,134

### Re: Polygon Clipping Java, Help Please.

This is a whole assignment with rectangles and complicated polygon. This is also our one and only clipping assignment well.

by wtosh
Replies
50
Views
2,134

### Re: Polygon Clipping Java, Help Please.

That's what i'm trying to do. Clip many sided polygons

by wtosh
Replies
50
Views
2,134

### Re: Polygon Clipping Java, Help Please.

Well my professor taught us what clipping means but the thing is that I don't know how to implement it into code.

by wtosh
Replies
50
Views
2,134

### Re: Polygon Clipping Java, Help Please.

I don't know how one polygon clips another is what i'm saying. The clipPolygon() should return the new vertices.
isInside is always true because there is no clipBorder value to compare it too?
The...

by wtosh
Replies
50
Views
2,134

### Re: Polygon Clipping Java, Help Please.

I believe there is 2 types of polygons. I am using to clip with and the other is the polygon i need to clip. How am i suppose to clip with that polygon, I believe it's the x0,x1,y0,y1.

As for the...

by wtosh
Replies
50
Views
2,134

### Re: Polygon Clipping Java, Help Please.

How would I do the intersect method? If clipBorder isn't working for me.

by wtosh
Replies
50
Views
2,134

### Re: Polygon Clipping Java, Help Please.

The printed vaubles does not tell me what's going on. The intersectx and y are always 0 since i never instaniated that. LyxCxy are always changing.

by wtosh
Replies
50
Views
2,134

### Re: Polygon Clipping Java, Help Please.

//
// Clipper.java
//

//

/**
* Object for performing clipping
*
*/

by wtosh
Replies
50
Views
2,134

### Re: Polygon Clipping Java, Help Please.

//
// Clipper.java
//
//
// Created by Joe Geigel on 1/21/10.
//

/**
* Object for performing clipping

by wtosh
Replies
50
Views
2,134

### Re: Polygon Clipping Java, Help Please.

It's suppose to clip the polygons so it's half shaded. The image is the results.
I did do the println() and it didn't help me to figure out why it's always true.

by wtosh
Replies
50
Views
2,134

### Re: Polygon Clipping Java, Help Please.

sweet, i'll try it.

--- Update ---

Alright, the condition is always true, it seems. Do you have any ideas how to fix this algorithm then?

by wtosh
Replies
50
Views
2,134

### Re: Polygon Clipping Java, Help Please.

I'm trying to clip out of some of the parts in each polygon. I'm stuck on that and I been debugging since this post but somehow my method isIntersect isn't being called/used. What I have now is all...