Search:

Type: Posts; User: wtosh

Page 1 of 2 1 2

Search: Search took 0.07 seconds.

  1. Replies
    50
    Views
    5,524

    Re: Polygon Clipping Java, Help Please.

    Do i need anything else besides this method?
  2. Replies
    50
    Views
    5,524

    Re: Polygon Clipping Java, Help Please.

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

    I think I will implement this design.
  3. Replies
    50
    Views
    5,524

    Re: Polygon Clipping Java, Help Please.

    Uhhhh, I don't have one yet.
  4. Replies
    50
    Views
    5,524

    Re: Polygon Clipping Java, Help Please.

    Using the compare method? I guess?
  5. Replies
    50
    Views
    5,524

    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...
  6. Replies
    50
    Views
    5,524

    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...
  7. Replies
    50
    Views
    5,524

    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......
  8. Replies
    50
    Views
    5,524

    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...
  9. Replies
    50
    Views
    5,524

    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...
  10. Replies
    50
    Views
    5,524

    Re: Polygon Clipping Java, Help Please.

    I can't seem to convert the design into code.
  11. Replies
    50
    Views
    5,524

    Re: Polygon Clipping Java, Help Please.

    I have a design, it's written in my notebook.
  12. Replies
    50
    Views
    5,524

    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...
  13. Replies
    50
    Views
    5,524

    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.
  14. Replies
    50
    Views
    5,524

    Re: Polygon Clipping Java, Help Please.

    That's what i'm trying to do. Clip many sided polygons
  15. Replies
    50
    Views
    5,524

    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.
  16. Replies
    50
    Views
    5,524

    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...
  17. Replies
    50
    Views
    5,524

    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...
  18. Replies
    50
    Views
    5,524

    Re: Polygon Clipping Java, Help Please.

    How would I do the intersect method? If clipBorder isn't working for me.
  19. Replies
    50
    Views
    5,524

    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.
  20. Replies
    50
    Views
    5,524

    Re: Polygon Clipping Java, Help Please.

    //
    // Clipper.java
    //

    //

    /**
    * Object for performing clipping
    *
    */
  21. Replies
    50
    Views
    5,524

    Re: Polygon Clipping Java, Help Please.

    //
    // Clipper.java
    //
    //
    // Created by Joe Geigel on 1/21/10.
    // Copyright 2010 __MyCompanyName__. All rights reserved.
    //

    /**
    * Object for performing clipping
  22. Replies
    50
    Views
    5,524

    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.
  23. Replies
    50
    Views
    5,524

    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?
  24. Replies
    50
    Views
    5,524

    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...
  25. Replies
    50
    Views
    5,524

    Re: Polygon Clipping Java, Help Please.

    What am I doing wrong?
Results 1 to 25 of 26
Page 1 of 2 1 2