All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Unit square overlap I (Posted on 2023-05-12)
The overlap of two unit squares is a rectangle with area 1/16.

Find the minimum distance between their centers.

 No Solution Yet Submitted by Jer No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 numeric solution | Comment 1 of 7

for y=0:.1:1
h=1-y;
w=(1/16)/h;
x=1-w;
dist=sqrt(x^2+y^2);
fprintf('%11.9f %11.9f %15.13f\n',x,y,dist)
end

takes the center of the first square as the origin and places y in a range of possible places and computes the x value to produce an area of 1/16.

The table produced:
`      x           y         distance0.937500000 0.000000000 0.93750000000000.930555556 0.100000000 0.93591326626740.921875000 0.200000000 0.94332047344740.910714286 0.300000000 0.95885374807840.895833333 0.400000000 0.98107969151900.875000000 0.500000000 1.00778221853730.843750000 0.600000000 1.03533282692090.791666667 0.700000000 1.05675735678120.687500000 0.800000000 1.05482522248950.375000000 0.900000000 0.9750000000000       -Inf 1.000000000             Inf`

shows promising areas at the beginning and the end, which is understandable as x and y can be flipped. It's not symmetric as only y was guaranteed to be an integral multiple of 1/10.

The range of y values was narrowe:

for y=0.933012508-.000001:.0000001:0.933012508+.000001
h=1-y;
w=(1/16)/h;
x=1-w;
dist=sqrt(x^2+y^2);
fprintf('%11.9f %11.9f %15.13f\n',x,y,dist)
end

`>> unitSquareOverlapI0.067003927 0.933011508 0.93541434682080.067002534 0.933011608 0.93541434680040.067001141 0.933011708 0.93541434678170.066999748 0.933011808 0.93541434676490.066998355 0.933011908 0.93541434674980.066996963 0.933012008 0.93541434673650.066995570 0.933012108 0.93541434672500.066994177 0.933012208 0.93541434671530.066992784 0.933012308 0.93541434670730.066991391 0.933012408 0.93541434670120.066989999 0.933012508 0.93541434669680.066988606 0.933012608 0.93541434669430.066987213 0.933012708 0.9354143466935   *0.066985820 0.933012808 0.93541434669450.066984427 0.933012908 0.93541434669730.066983035 0.933013008 0.93541434670190.066981642 0.933013108 0.93541434670820.066980249 0.933013208 0.93541434671640.066978856 0.933013308 0.93541434672630.066977463 0.933013408 0.93541434673800.066976070 0.933013508 0.9354143467515`

giving the numerical value of   0.9354143466935 as the minimum distance between the centers.

 Posted by Charlie on 2023-05-12 13:49:09

 Search: Search body:
Forums (0)