i have three points on the same Cartesian plane, i am also able to find the fourth points, which ultimately forms a rectangle kind of a shape, i am struggling to find the logic to find the rest of the points inside the rectangle based on the size of rows and columns mentioned. i try to explain the points pattern below.
i am not using any matrix. to visualize better, o - defines the points i want to achieve, 0 - defines the points i have already. The division of supposedly , rows and columns of the points i would like to take as variable values from the user.
1.this is what i have, 3 points
0 0
0
i am also able to find the fourth point, i.e.
0 0
0 o
3.I want to obtain a logic or equation which we give me any kind of shape when rows and columns are provided, to find the remaining points , basically complete the rectangle dynamically based on the size provided. eg-
for 3x3 points pattern
0 o 0
o o o
0 o o
for 4x3 points pattern
0 o o 0
o o o o
0 o o o
for 3x2 points pattern
0 o 0
0 o o
for 2x3 points pattern
0 0
o o
0 o
What I have tried:
i am not using any matrix. to visualize better, o - defines the points i want to achieve, 0 - defines the points i have already. The division of supposedly , rows and columns of the points i would like to take as variable values from the user.
1.this is what i have, 3 points
0 0
0
i am also able to find the fourth point, i.e.
0 0
0 o