Re: Polygon Matrices



"Gustavo J. " <gjvergar@xxxxxxxxx> wrote in message <gopn7u$31t$1@xxxxxxxxxxxxxxxxxx>...
Sorry about that.
I used an image with a 640x480 pixel size
The X represents a matrix of all the x coordinates
The Y represents a matrix of all the y coordinates
if you put the numbers into a notepad and make the txt files, you can read them into matlab using 'read(filename.txt)

so I did the following
took the x and y values and made two txt files
xcoord.txt
ycoord.txt

Then in matlab I did:
x=read(xcoord.txt)
y=read(ycoord.txt
figure;plot(x,y)

To answer your question (if you plot the points) they show the corners of of nine polygons. They are all out of order.

Not sure if there is a way to upload files or pictures, but if you want I can give you my email address and I can send you pictures of what I am trying to do.


I read them into matlab. Copy and paste does as well
as anything else. There are 22 (x,y) pairs of points.
How do you choose to create 9 different polygons
from those 22 points in the plane?

These are 22 disconnected points, that are not even
in sequence. I see no sensible way to know that one
would expect to tile the region enclosed by exactly 9
quadrilateral polygons. 10 perhaps, but why 9?

Sorry, but there is no magic to be found here, certainly
not so to automatically create a set of 4 sided polygons.
You might choose to make one single closed polygon
out of it, perhaps using a TSP code. (Traveling Salesman)
Then triangulate the polygon using one of several
schemes. This will result in triangles though.

John
.



Relevant Pages

  • Re: roifill (or equivalent) in 3-d?
    ... matlab is doing what it is supposed to. ... poly2mask do not correctly fill the two polygons as two distinct ... pixels are what poly2mask filled in. ... bryan smith wrote: ...
    (comp.soft-sys.matlab)
  • Re: Polygon Matrices
    ... Then in matlab I did: ... To answer your question they show the corners of of nine polygons. ... gjvergar@xxxxxxxxx (this is a temp email address, ... but I could not make histc work for me. ...
    (comp.soft-sys.matlab)
  • Re: specifying bounds for optimization
    ... In using the optimization functions provided by MATLAB, is there a way to specify two polygons as the outer and inner bounds, instead of the upper and lower bounds of x? ... convex set. ...
    (comp.soft-sys.matlab)
  • Re: Normalized Sue Testing
    ... it's not a smooth surface, but one with little hairs, ... Which is all missing from the computergenerated pictures. ... tiny little polygons and assembling the object you want from them; ... If humans stay away from the beasts' living rooms, ...
    (rec.arts.sf.composition)
  • Re: pictureBox fusion
    ... The 2nd one is a chart made of polygons with many many points, redrawn many times a minute ... I wish to "join" both pictures in the same pictureBox without having to redraw the first one every time, ... What colour is the first picture (the one which has to be overlaid on-top of the polygons?) If red, green, blue, black ... or white (or swapping to the inverse of the underlying colour) then you can do this with a simple BitBltraster ...
    (microsoft.public.vb.winapi.graphics)