*** This comment has been added since I wrote this post , so...
Please don't bother to reply to these ramblings... I'm getting closer to my solutiuon now, using an exponential formula ... will elucidate later ... thanks, John ***
Thanks for your advice...
"... just looking for an approximate function, so we can be quite casual about it. "
Exactly, 'casual' being the operative word, here.
In fact, I think I must be getting senile - because when I thought about it some more, all I really need to do is to plot an arc of a circle such that I can alter the starting point (starting from between 270 degrees to say 200 degrees) through an arc ending flat at 180 degrees!
Now I'm feeling really dense so perhaps you could spell it out for me Christo?
Here's what I have in an Excel spreadsheet at the mo':
max_price per cm2: 3.333 Baht for 1,200 cms2
min_price per cm2: 0.667 Baht for 60,000 cms2
Therefore: price_spread = 2.667 Baht
Therefore: size_spread = 58,000 cms2
Price per cm2 = max_price - (area_to_price - min_size) * price_spread / size_spread
This formula at least starts and ends at the right prices (compatable with the max and minimum prices of the competition). However, when I create an Excel graph (that plots prices per cm on the vertical axis against area on the horizontal axis for intervals of every five centimeters e.g. 30 x 40, 35 x 45, 40 x 50 ... ) the curve bulges upwards (making small price variations at the smaller area range) rather than the other way around (large price variations for the smaller areas flattening to little change near the maximum area).
When I fake the area prices across the relevant range, and graph it. I see an arc of a circle of perhaps 30 degrees (although it's suddenly obvious to me that this very much depends on the aspect ratio of the graph axes!).
I'm sure the answer is blindingly obvious, but I'm obviously blind!!!
If you could give me an idea of a formula to plug into Excel then I'm sure I'll be able to translate it into PHP.
However, as I said, the formula needs to be as simple as possible to cut down execution time - so I'm wondering if logarithmic or cubic functions are practical for server-side processing on the Internet requiring as many as fifty calculations (plus database accesses for additional product data)?
Perhaps I'll need a lookup table for the implementation, instead - whadya think?
"... ps, what's the moonraker reference? ..."
Arrr, p'raps you don't 'ave scrumpy cider in Swindon any more. 'Moonrakers' refers to them that's pissed on scrumpy zider tryin' to 'arvest moonlight tha's reflected in village pond, with their grass rakes, ain't it? Hence, moonrakers. Errr, I think!?
"pps, how d'you manage to escape to Phuket?"
Errm, more like 'trapped in poverty' for the last six years! I spent three months and $8,000 in Florida picking up 23 scuba instruction certifications (up to Master Scuba Diver Trainer - which is just short of being able to train Intructors) thinking I could live comfortably for a year or so, in a bungalow on the beach.
However, when I arrived I quickly found out there were numerous student divemasters willing to work for free as dive leaders just to get out on the dive boats, and the dive operators were too cheap and unregulated not to take advantage of this situation! Doh!
Nevertheless, due to my extensive experience of twelve years as an IT documentation and training consultant for the likes of IBM, DEC, Chase Manhattan, etc. I was quickly hired by a dive operator for the vital role of answering the email in the back office (which lasted six? months)! Double-Doh!