I've got a long thin image which consists of a frieze of identical square cells.
I've also got a wall of varying height, described by a complex function.
I want to distort the image so as to retain the aspect ratio of the cells, whist stretching it to the height of the wall.
Sometime the function might go to zero or close to zero, so there also needs to be a cut off point to avoid a large accumulation of very small cells.<snip>
My current attempt is to take a lot of wall height samples.
your image is rectangular with dimensions -say- WxH (e.g. W could be 1024 and H would be 64, for 16 squares in total)
On Tuesday, 14 September 2021 at 15:30:26 UTC+2, Malcolm McLean wrote:the aspect ratio. And, in that scenario, a simple approach would to enlarge and deform the whole image in order to make it match the wall shape, i.e. disregarding the single squares and just stretching in height along the image in order to match the
I've got a long thin image which consists of a frieze of identical square cells.So, if I get you right, your image is rectangular with dimensions -say- WxH (e.g. W could be 1024 and H would be 64, for 16 squares in total).
I've also got a wall of varying height, described by a complex function.Which I read that your wall has horizontal base and vertical sides, just the top is curvilinear and describe by some function h(x) for x ranging over the base of the wall.
Correct that far?
I want to distort the image so as to retain the aspect ratio of the cells, whist stretching it to the height of the wall.Here you should be specific: "distorted" how exactly? In the scenario depicted above, just the upper side of the squares (and of the whole image) must become curvilinear, the other sides have to remain straight, so there is no way to actually preserve
Sometime the function might go to zero or close to zero, so there also needs to be a cut off point to avoid a large accumulation of very small cells.
My current attempt is to take a lot of wall height samples.<snip>
There should be some closed form solution, no need for brute force or similar, but you'll have to clarify your "geometric" requirements above.
On Tuesday, 14 September 2021 at 15:30:26 UTC+2, Malcolm McLean wrote:
I've got a long thin image which consists of a frieze of identical square cells.So, if I get you right, your image is rectangular with dimensions -say- WxH (e.g. W could be 1024 and H would be 64, for 16 squares in total).
I've also got a wall of varying height, described by a complex function.Which I read that your wall has horizontal base and vertical sides, just the top is curvilinear and describe by some function h(x) for x ranging over the base of the wall.
Correct that far?
the aspect ratio. And, in that scenario, a simple approach would to enlarge and deform the whole image in order to make it match the wall shape, i.e. disregarding the single squares and just stretching in height along the image in order to match theI want to distort the image so as to retain the aspect ratio of the cells, whist stretching it to the height of the wall.Here you should be specific: "distorted" how exactly? In the scenario depicted above, just the upper side of the squares (and of the whole image) must become curvilinear, the other sides have to remain straight, so there is no way to actually preserve
Sometime the function might go to zero or close to zero, so there also needs to be a cut off point to avoid a large accumulation of very small cells.
My current attempt is to take a lot of wall height samples.<snip>
There should be some closed form solution, no need for brute force or similar, but you'll have to clarify your "geometric" requirements above.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 72:32:57 |
Calls: | 6,657 |
Calls today: | 3 |
Files: | 12,203 |
Messages: | 5,332,304 |
Posted today: | 1 |