i have a window of size M*N how to place 'x' no of rectangles with aspect ratio of p:q…
Jump to turn (7)
- 1i have a window of size MN how to place 'x' no of rectangles with aspect ratio o
- 2create a python code for this
- 3how to find longest word in a sentence python
- 4how to place a text in a window with maximum font-size python
- 5how to place a text in a window with maximum font-size python for cv2
- 6how to place a text in a window with maximum font-size python for pil
- 7correct the code "import cv2 import math from PIL import Image, ImageDraw, Image
- User
i have a window of size M*N how to place 'x' no of rectangles with aspect ratio of p:q such that minimum space is left in the window
- Assistant
To place 'x' number of rectangles with aspect ratio of p:q in a window of size M*N such that minimum space is left in the window, you can follow these steps:
-
Determine the size of each rectangle based on the aspect ratio p:q. Let the width of each rectangle be W and the height be H. Make sure that W = p * H = q * W.
-