I've searched and racked to no avail.. so, does anyone have an algorithm to create a concertina type rectangle, ideally horizontally.
The desired effect is exactly like开发者_C百科 that of normal horizontal Window Blinds (assume they're closed- doesn't matter) of say 30 parts (or slats) of equal height and uniform width.
When such a blind is raised half-way up notice how the parts at the bottom go from dead flat to an increasing value in height, with perhaps the top-most part hanging normally.
Similarly, when the whole Blind is all the way up, all parts are flat. Conversely, when the whole Blind is fully extended, all parts hang at their own, uniform height.
It's this "slightly differing but related to my neighbors height" I'm stuck on. Any pointers much appreciated.
There you are, I hope it is what you wanted: http://wonderfl.net/c/64Pv
Logically, I should bother you with something like "don't expect people to write code for you here".... but it looked like fun to do and I enjoyed it. This could be way more perfect mathematicaly but this is still a simple way to achieve the effect.
Cheers
精彩评论