« first day (29 days earlier)      last day (39 days later) » 

 
1 hour later…
6:41 AM
0
Q: Algorithm for distributing 2D Boxes as binary space partitioning

Andre AhmedI have a wardrobe like this This is in 3D, but I use boxes in 2D to construct them at final. But here's an example, you have a box in 2D (A). You add a vertical divider to it, so you split it into two separate boxes, A and B. Then you add a horizontal divider in B, so now you have A, B, and C. F...

I posted example that can be run in console c#
 
2 hours later…
8:12 AM
@Spektre
 
5 hours later…
12:46 PM
@Spektre
Hi waiting you since 6AM
No progress at all
so did you write the function that finds direct neighbors in one of the 4 directions ?
I wrote similar to quad tree
binary boxes partition
I didn't know how to do your approach
used GPT
I don't know coding
I should quit
very depressed
and sell Kebab
want money so much and can't finish that project
GPT is useless
quadtree ?
that just complicates things
you have list of panels
so WRITE funcition that tales as input
index of selected panel
and direcion (0 90 180 270 deg)
and return list of indexes of all panels that are closest neighbor in that direction
so single for loop + some if statements ...
once that is working only then move to next step
12:56 PM
panel is represented as width,height, thickness
and x,y,z, rotationX,Y,Z
how can I get closest neighbour
by distance ?
check each one versus other and check distance ?
first check only panels in same orientation
order them by position and axis selected by direction
what is direction here
or just remember the closest one
however once panels overlap
there might be more than 1 neigbor
and that needs some tweaking
direction is S,E,N,W
or X+ Y+ X- Y-
or 0 90 180 270 deg
and how do I calculate it
its not important its input parameter
1:05 PM
tan ?
its not calculated at all
its input parameter
would you mind, if you can make a console app, no graphics at all, just simple output that slices the 2D boxes ?
I will study it
I wrote you yesterday I have no time for that
and convert it to app
is it that big ?
no but my time is scarce now
1:07 PM
I can pay 100Euro, if you like
once I get the fund from client
it's 150Euro
will take the 50 as I have no single euro
I do not have time for coding ... money will not help with that
need to finish big project and from tomorow I have time limited huge project to work on from scratch
from one minute ago
had similar state 2 week ago
ok can you write detailed algorithm and steps
that I can translate it into code
1:18 PM
I mean
text
not code
here something simple but not robust
in ix - selected panel
in d  - direction

out iy - neigboar

dir[3]={cos(d),sin(d),0.0};
for (dd=0.0,iy=-1,i=0;i<n;i++) 				// all panels
 if (i!=ix)             				// except self
  if (panel[ix].rotation == panle[i].rotation) 		// test only same oriented
   {
   d0=dot(panel[i].position-panel[ix].position,dir); 	// distance of i from ix
   if ((i<0)||(dd>d){ dd=d0; iy=i; }			// remember closest
   }

 // here iy is closest neighbor to ix
it find only single neigboar
and does not ignore panels that are not overlaping ix
so you need to add the overlaping test
(you know ignore panels that are fully above or below ix)
iy=-1 means no neighboar found
ok and then what is followed ?
steps
then you can start code the operations ... but first it MUST work
1:36 PM
ok I surrender
thanks so much for your time
have to tend to kitchen
going off
bye for now

« first day (29 days earlier)      last day (39 days later) »