| |
 |
|
|
Science Forum Index » Fractals Science Forum » Having luck -- trying a huge Menger Cube
Page 1 of 1
|
| Author |
Message |
| Hansenet |
Posted: Fri Apr 11, 2008 12:21 pm |
|
|
|
Guest
|
Hello Folks,
in the last thwo weeks ago, i had a lot of luck.
At the 12.3.2008, i think i should try my luck und asked myself what are my
numbers for the day.
I went to the casino with 200 Euro played Corner (Chance about 1: , with
100 euro on one corner, when i played the round.
After 50 minutes i went out with 1900 euro. But i won't enter a casion
again, theres a risk for a lot of people to get gambling-addicted.
Two days later at the 14.3.2008 place a stock order about 2300? on
Amazon(which was named for shorts) when it stock drops 10 cent.
The order was deleted. On the next day was announced that the Citigroup has
stabilized Amazon with a lot of investmentment at the stock excange and
i good forecast.
There where some news meesages, that the stabilsation von Amazon was one of
the main reasons for the finance crisis.
I'am happy i could do a little bit to help Amazon which gaves strong
indivisualised learning possibilties to good conditions and has a personal
politic, where peope soley get payed for their work and should get nothing
just because they are strong.
I think the finance crisis was due und will be overcome my mankind. The risk
played by the great players was to high, we might have ended in a atom war.
I think some banks, espically migthy, should cut their reveneue, perhapst a
another drop in lead interest (in german Leitzinsen).
I wanted to play a knock-out on Amazon over 4 Days with 1700 euro and a
lever of 256, for which i found a paper, but i couldnot buy it by my bank:
the citibank.
I got that evening two other numbers 262 and 13:25(time on the 14.3).
Two day ago i started a try to produce a chaos menger cube with 262
entries(currently i'am at 16) in each dimension and a removal algorithm
derived from my numbers.
Hope is that i can generate a huge menger cube, which might be a hint for a
better solution for a specific problem at a specific time.
I have reserved two more days for that. But i'm very badly qualified for
high mathematics, i'am a intiutive real world programmer.
I use povray for output but it breaks on the 4 million objects i want to
display.
Currently my efforts take more and more computation time, i use
rand()(Visual c++ from Visual Studio 2008) and can't put a better random
generator in.
I think its crazy and has very little possibilty for success, but i wanted
just to give it a chance.
The numer I'am having:
10 e32
8
3,995
262
-- Some derived numbers are:
3 (Section length to take out)
13,1 (loud, hint for the probabilty to take out another cube), computed some
numbers from it
1 (there hould be another cube be taken out on each turn, think thats wrong,
try another number)
256 (262, 32,16) hints for the number of cubes on each axis.
The might be operation needed like a change of magnitude(divide by 100r 100
or 1000) or a divide by 2 or some other operations.
And even if god send my some number's i surley can't pick them up precise.
I'am short before giving up on this.
And surley i will in 3 days again start programing/extend document
mangement systems in c# and continue my universal remote for windows mobile.
Regards
Winfried Wille
Web: w2ww.de/bewerb
Mobile: +49(40)173703137
Email: ww@w2ww.de |
|
|
| Back to top |
|
| Hansenet |
Posted: Fri Apr 11, 2008 1:41 pm |
|
|
|
Guest
|
Hallo,
i don't get the program done its buggy.
I take a liitle rest, if some want to try its luck:
void a_cube(float cx,float cy,float cz,float width)
{float w2;
w2=width/2;
objects<<"\nbox{";
objects<<"\n<"<<cx-w2<<","<<cy-w2<<","<<cz-w2<<"><"<<cx+w2<<","<<cy+w2<<","<<cz+w2<<">";
objects<<"\n}";
}
long Called=0;
long MaxCalled=10000;
void sponge(int level,float cx,float cy,float cz,float width)
{ // A recursive recipe for the menger sponge; add seasoning as desired.
float w3=width/3;
if (level==0) { a_cube(cx,cy,cz,width); } //draw final small undivided
cube
else {
/*the 27 subdivisions of the cube are shown. 7 are removed from each
recursion level */
sponge(level-1,cx-w3,cy+w3,cz+w3,w3);
sponge(level-1,cx ,cy+w3,cz+w3,w3);
sponge(level-1,cx+w3,cy+w3,cz+w3,w3);
sponge(level-1,cx-w3,cy, cz+w3,w3);
/*sponge(level-1,cx ,cy, cz+w3,w3); */
sponge(level-1,cx+w3,cy, cz+w3,w3);
sponge(level-1,cx-w3,cy-w3,cz+w3,w3);
sponge(level-1,cx ,cy-w3,cz+w3,w3);
sponge(level-1,cx+w3,cy-w3,cz+w3,w3);
/* step z */
sponge(level-1,cx-w3,cy+w3,cz ,w3);
/*sponge(level-1,cx ,cy+w3,cz ,w3); */
sponge(level-1,cx+w3,cy+w3,cz ,w3);
/*sponge(level-1,cx-w3,cy ,cz ,w3); */
/*sponge(level-1,cx ,cy ,cz ,w3); */
/*sponge(level-1,cx+w3,cy ,cz ,w3); */
sponge(level-1,cx-w3,cy-w3,cz ,w3);
/*sponge(level-1,cx ,cy-w3,cz ,w3); */
sponge(level-1,cx+w3,cy-w3,cz ,w3);
sponge(level-1,cx-w3,cy+w3,cz-w3,w3);
sponge(level-1,cx ,cy+w3,cz-w3,w3);
sponge(level-1,cx+w3,cy+w3,cz-w3,w3);
sponge(level-1,cx-w3,cy ,cz-w3,w3);
/*sponge(level-1,cx ,cy ,cz-w3,w3); */
sponge(level-1,cx+w3,cy ,cz-w3,w3);
sponge(level-1,cx-w3,cy-w3,cz-w3,w3);
sponge(level-1,cx ,cy-w3,cz-w3,w3);
sponge(level-1,cx+w3,cy-w3,cz-w3,w3);
}
}
void sponge262(int level,float cx,float cy,float cz,float width)
{ // A recursive recipe for the menger sponge262; add seasoning as
desired.
//RAND_MAX = 10000;
MaxCalled +=1;
float scale=1/20;
int segments=256;
double pickoutpercent = 13.1;
float w3=width;
//int SELLENGTH=2;
int selstart;
// int takeout=segments/3;
int takeout;
int sellength=segments/3;
if (level==0) { a_cube(cx,cy,cz,width); } //draw final small undivided
cube
else {
if(Called >= MaxCalled) return;
int subtractone = false;
bool subtractsecond = true;
bool subtractleft = false;
// RAND_MAX = 10000;
takeout=0;
for(int it = 0 ; it < segments; it++){
double d = RandomGeneratorSingleton->rand();
if( d <= 0.05117)
takeout +=1;
}
// if(d < 0.955) subtractone = true; //0.655
//RAND_MAX = 10000;
// double d2 = RandomGeneratorSingleton->rand();
//if(false && d2 < 0.5) subtractsecond = true;
// RAND_MAX = 10000;
double d3= RandomGeneratorSingleton->rand();
if(d3 < 0.5) subtractleft = true; //0,5
selstart = segments/2-((segments/3)/2); //098.25
sellength = (segments/3);
if(!subtractleft){
/* if(subtractone) {
selstart-= takeout;
sellength -= takeout;
}
*/
if(subtractsecond){
selstart -= takeout;
sellength -= takeout;
}
//if(subtractone && subtractsecond) selstart -=1;
}else{
/* if(subtractone){
selstart -= takeout;
sellength -=takeout;
} */
if(subtractsecond){
selstart -= takeout;
sellength -=takeout;
}
//if(subtractone && subtractsecond) selstart +=1;
}
for(int i=0; i < segments; i++){
if( i>= selstart && i < (selstart + sellength - 3) )
continue;
for(int j=0; j < segments; j++){
if( j>= selstart && j < (selstart + sellength - 3) )
continue;
for(int k=0; k < segments; k++){
if( k>= selstart && k < (selstart + sellength - 3) )
continue;
sponge262(level-1,(cx+w3*i), (cy+w3*j), (cz+w3*k), w3);
}
}
}
}
}
/***** Main *****/
int Render()
{
RandomGeneratorFactorySingleton = new RandomGeneratorFactory();
RandomGeneratorSingleton =
RandomGeneratorFactorySingleton->BuildRandomGenerator();
// RandomGeneratorSingleton =
RandomGeneratorFactorySingleton->BuildRandomGenerator("ChiSquare");
objects.open("/Projects/Menger/csi/Sponge_viewer/objects.h"); if(!objects)
{std::cout<<"\nError opening file!"; return 1;}
//objects.open("T:\\Projects\\Menger\\csi\Sponge_viewer\\Sponge_viewer_con\\objects.h") objects<<"\n#declare "<<"sponge"<<" = union {"; sponge262(1,0,0,0,0.2); //sponge(recursion level, x,y,z, size) objects<<"\n} //end of union"; std::cout<<"\nThat's all, Folks!\n"; return 0; } |
|
|
| Back to top |
|
| |
|
Page 1 of 1
All times are GMT - 5 Hours
The time now is Fri Jul 25, 2008 3:39 am
|
|