I know how to draw on the brain but how do I draw precisely? Is the brain screen a grid i.e is it a grid with coordinates and what is the grid measurements, is it 200 by 200? The task i am trying to complete is making a bar graph of motor temperatures but I can’t get rectangles to form in specific spots.
You would have to ask @77240G-SC if the flag filled the screen, but here is the post with the numbers he used and he said it worked. He wanted to draw the Ukrainian flag on his brain and I suggested he try 0, 0, 300, 100
for the blue part and 0, 100, 300, 100
for the yellow part. The inputs are x1, y1, x2, y2
, so if you put 0, 0, 300, 100
, it will draw a rectangle with corners at (0, 0)
and (300, 100)
. I don’t know what the measurements are, either, but I guessed it was 300 wide (x
) by 200 high (y
), so he would want 300 x 100 for each rectangle. Apparently it worked, so maybe it is 300 x 200, or maybe the brain was drawing off the screen. I suggest you do something like
for (int x = 0; x < 500; x++) {
drawRectangle(x-3, 47, x+3, 53);
printAt(/*somewhere out of the way*/, "X: %f", x);
wait(30, msec);
}
for (int y = 0; y < 400; y++) {
drawRectangle(97, y-3, 103, y+3);
printAt(/*somewhere out of the way*/, "Y: %f", y);
wait(30, msec);
}
And when the square goes off the screen, you quick look at the number it’s printing and figure that’s the end of the screen. Then, if you want to be even more exact, you can go back and do something like
for (x = 280; x < 320; x++) {
drawPixel(x, 100);
print(x);
wait(100, msec);
}
Please post your results here, and which side of the brain is 0
and everything; I’d love to know, too!
It doesn’t fully cover, but is large enough to see, could be about 100 more to the right side i think