Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Newsgroups | comp.theory |
| Subject | Re: Fiting squares under a curve. |
| Date | 2021-09-15 15:17 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <87fsu5gby7.fsf@bsb.me.uk> (permalink) |
| References | <373e789b-4461-4ee2-8c7a-f4f82053dea1n@googlegroups.com> |
Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes: > Maybe there's enough theoretical content here to justify a post to > comp.theory, though it's largely a practical problem. > > I have an image made up of a frieze of square cells. I can add cells > at will to the left or the rich (within reason). I want to fit it to a > wall with a curved top, retaining the aspect ratio as much as > possible. So small cells in low parts of the wall, large cells in high > parts. > > The flat top case is easy. The cell width is given by the height of > the wall to make a square. It is then rounded to make a whole number > of cells. As long as the wall is longer than it is high, the worst > case is a 150% scaling in the x direction. Normally the wall is much > longer than high, and distortion is negligible. > > However I want to allow a curved top. So the cells are no longer of > the same height, in fact they are quads with two right angles at the > bottom and a sloping top. The stright line function of the cell tops > approximates the wall top curve. > > if we consider the solution to be a set of points in x along the wall > representing cells, and the midpints the boundaries of cells, then we > need to minimise the function > > sum over each cell : integral of wall function from cell x low to cell > x high minus (cell x high - cell x low) squared. > > Is there a fast way of doing this? It might be useful to know why I didn't comment before in comp.programming: I didn't understand what the constraints are. You can add cells to some already given strip of cells but what is "with reason"? Can you add cells from some restricted set, or can you choose everything about the cells you add? Can you choose anything about the initial frieze? You can scale something. It is the function to be fitted or the frieze of cells? Scaling implies an origin. What is that origin and/or can the scaling be accompanied by a translation making the origin unimportant? Do you have any extra information about the function? For example, is it everywhere continuous and maybe even smooth? -- Ben.
Back to comp.theory | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Fiting squares under a curve. Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2021-09-15 06:59 -0700
Re: Fiting squares under a curve. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-09-15 15:17 +0100
Re: Fiting squares under a curve. Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2021-09-15 08:06 -0700
Re: Fiting squares under a curve. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-09-15 22:33 +0100
Re: Fiting squares under a curve. Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2021-09-15 15:01 -0700
Re: Fiting squares under a curve. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-09-16 00:33 +0100
Re: Fiting squares under a curve. Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2021-09-17 03:25 -0700
Re: Fiting squares under a curve. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-09-17 14:22 +0100
Re: Fiting squares under a curve. Andy Walker <anw@cuboid.co.uk> - 2021-09-17 16:25 +0100
Re: Fiting squares under a curve. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-09-17 20:59 +0100
Re: Fiting squares under a curve. Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2021-09-23 02:14 -0700
csiph-web