Re: Rectangle subtraction



What are you looking for?
The dimensions or the area?

If your door dimensions are W, H
and the dimensions of the wood pieces
are w1, h1 ; w2, h2 ; etc.
you get the total area of the array of
rectangles of glass as follows:
A = W*H - w1*h1 - w2*h2 - ...etc.
The area of the single rectangle
will be A / n, where n is the number
of all rectangles (assuming they are
all the same).

The program will work as follows:
1a. input door height: (H = input)
1b. input door width (W = input)
2. A = H*W
3a. set number of wood pieces n to zero
n = 0
3b. begin loop
input number of same wood pieces (m = input)
or zero to exit
if m == 0 exit loop
else
n = n +1
input wood piece width (w = input)
input wood piece height (h = input)
end if/else
A = A - m*w*h
end loop
4. print 'area of single glass rectangle is : ', A / n

Is it what you are asking for?

Claudio

"Perry van Kuppeveld" <www@xxxxxxx> schrieb im Newsbeitrag
news:42a83236$0$6809$e4fe514c@xxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> Ik need to write a program to determine the rectangluar spaces in a door.
> The door is built of rectangular pieces of wood.
>
> To solve this i thought the following:
> I have one rectangle (width / height of the door) and subtract all pieces
of
> wood, there's a array of rectangles left, which are the needed rectangles.
>
> I have a poor math knowledge, so any help would be fine.
>
> Thanks,
>
> Perry
>
>
>
>


.



Relevant Pages

  • Re: Rectangle subtraction
    ... > of wood devides the rectangle. ... If there's no split, alle rectangles are determinded. ... >> If your door dimensions are W, ...
    (sci.math)
  • Re: Rectangle subtraction
    ... i have to determine the size of the glass rectangles. ... of wood devides the rectangle. ... >> Ik need to write a program to determine the rectangluar spaces in a door. ...
    (sci.math)
  • Rectangle subtraction
    ... Ik need to write a program to determine the rectangluar spaces in a door. ... The door is built of rectangular pieces of wood. ... wood, there's a array of rectangles left, which are the needed rectangles. ...
    (sci.math)
  • Re: how to patch hole in door
    ... wood filler, matching grain. ... outer edge gets hidden by the door frame. ... | diameter of the hole and cut off a small piece and glue it in. ...
    (alt.home.repair)
  • Re: garage shelf project article???
    ... old solid wood door or other wood about ... thin but heavy hinges for the 'legs'. ... pencil to mark where the heavy big hinges will attach to the studs. ...
    (alt.home.repair)