divide
Andrew Gwozdziewycz
apgwoz at gmail.com
Fri Oct 7 13:51:14 CEST 2005
Do the divisions have to be themselves rectangles?
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
x____________B_____C_______x
x_____A____________________x
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
would be a representation of the problem?
However, though, I think that what you mean with your Points being
smaller and things, is that the points are centered in the middle of
their peice of the rectangle, whichs makes the problem really easy.
If that is the case, notice that:
width of Rectangle A = 2 * the_x_coordinate_ofA
Subsequent widths can be found by subtracting the left side of the
rectangle from the equation above. This is modified as follows
width of Rectangle X = 2 * the_x_coordinate_ofX - width_so_far
The height of your rectangles will all be the same (if i read the
question right), so translating this to python is simple.
On Oct 6, 2005, at 10:33 PM, Shi Mu wrote:
> I have three points in a rectangle and i wonder how to use PYTHON
> to divide the rectangle into three
> parts with each point located in the different part.
> For instance, Point A
> goes to Part I, Point B goes to Part II and Point C goes to Part III.
> And the distance between any point within Part I and Point A is
> smaller than to Point B and Point C. And the similar rule applies
> to Part II and Part III.
> Thanks for any idea.
> --
> http://mail.python.org/mailman/listinfo/python-list
---
Andrew Gwozdziewycz
apgwoz at gmail.com
http://ihadagreatview.org
http://plasticandroid.org
More information about the Python-list
mailing list