The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 16, 2019, 05:52:34 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: fill a rectangle with arbitrary shaped rectangles  (Read 1697 times)
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« on: June 14, 2011, 10:58:45 AM »

Anyone know a way to divide a rectangle into smaller arbitrary shaped rectangles, based on the number you want.

so...

A rectangle canvas, to be divided into 8 different sized rectangles for example? But i do not want another result to look the same (unless by accident).

any suggestion of how to do this? Is there a math thing I am forgetting? Or a looping methodology?

think modrian
http://www.google.com/search?rlz=1C1CHKZ_enUS435US435&q=modrian&um=1&ie=UTF-8&tbm=isch&source=og&sa=N&hl=en&tab=wi&biw=1680&bih=965

but automatically generated based on a number of desired internal squares.
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #1 on: June 14, 2011, 12:48:56 PM »

Does it have to be simply graphical?

I did a similar thing to hide footprint with random generated tables: random number of tables with random number of rows with random number of cells. If you further randomed the H/W of a CSS'd div in each cell, you could get a very interesting thang that was very different than any previous page.

A similar approach could be used to your division problem I'm thinking, simply because of the structured nature of HTML tables.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #2 on: June 14, 2011, 12:49:39 PM »

Hmm... adding rowspan and colspan to that mix would give you many of the Mondrian effects as well.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #3 on: June 14, 2011, 06:59:20 PM »

It would need to be HTML, positioned divs or tables.
Actually think I have a vague idea of how to do it by way of recursive subdividisions. The problem is the limits and restrictions and rounding errors.

This is a shits and giggles project. One of my crappytools potentially.
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #4 on: June 14, 2011, 10:27:18 PM »

If tables will work for you, then this is somewhat easy to start and would expand nicely.

Kind of busy ATM, but I can try to post some protocode later tonight or perhaps tomorrow. Not too tough and the rectilinear nature of tables will do you great. Much better than divs.

/p
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!