|
Probably.
From Wikipedia: an algorithm is a finite list of well-defined instructions for accomplishing some task that, given an initial state, will terminate in a defined end-state.
Seems to match.
Is it simple ?
Johpoke wrote: some very simple math
You claim it is, so it is.
But then sooner or later some one may come up with something simpler
that produces the same result...
|
|
|
|
|
Actually I see only an Image...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Luc Pattyn wrote: But then sooner or later some one may come up with something simpler
that produces the same result...
I meant that i dont use any advanced functions for mathematics.
the drawing code itself is kinda insane and the whole project would probably land in coding horrors if i where to release it
//Johannes
|
|
|
|
|
|
If I recall correctly, Trig is high school level mathematics which does not make it advanced by today's standards.
|
|
|
|
|
...usually basic arithmetic on integers produces also real number results...
(or your basic arithmetic operators are just + and - }?)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
|
The Grand Negus wrote: Such is life
Maybe such is your life, not mine (maybe I live in a parallel universe... )
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
|
Maybe you can move all your widgets to a parallel discussion board ?
|
|
|
|
|
|
The Grand Negus wrote: 3.14159
It seems you already took a couple of steps inside the parallel universe...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
The Grand Negus wrote: The actual universe is discrete
The current dominating perception of the universe is. It wasn't for centuries, maybe will be not the future one.
The Grand Negus wrote: (1) there's no end to numbers like those
Of course it's a feature, not a problem
The Grand Negus wrote: (2) there's nothing exactly like them in this universe
Actually there's no mathematical model that exactly resembles even a little piece of this universe.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
The Grand Negus wrote: Exactly how, in your universe, do you pack nine widgets into four boxes, where each box is only big enough for two? And how does 9/4=2.25 help you do that more than 9/4=2r1?
How would you pour 9 liters of water into 4 containers ensuring each container has an equal quantity? I would pour 2.25 (9/4) liters into each glass. 9/4=2r1 is not as useful as 9/4=2.25 in this example. I’m afraid I’m not ready to give up my rational (or even real) numbers.
Steve
|
|
|
|
|
If you were determined to use only integers you could, in theory, use the number of water molecules as a measure of volume. At one level this system is ultimately simple: unfortunately it is also impractical to the point of near impossibility. You say that you would use a smaller unit of measurement: so in this example each glass would contain 2250 milliliters. Is this really much simpler or more intuitive than 2.25 liters?
Steve
|
|
|
|
|
The Grand Negus wrote: Nine divided by four is two with one left over.
So it seems you also believe in rational numbers. Pity real life isn't always so simple. Presenting a simple example does not negate the existence of more complex ones or the more advanced tools which may be required to deal with them.
Steve
|
|
|
|
|
Actually he believe in a discrete universe.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Most people, including people who consider basic trigonomic function like sine and cosine advanced, could readily understand them if they were explained properly.
Steve
|
|
|
|
|
|
This appears to me to be a simple modification of the n-queens problem. Placing n queens on a board such that no queen can capture any other queen. I would persue this line of thought with a google search on the n-queens problem.
|
|
|
|
|
Hi,
I beg to differ. On an n*n board (with n>2) you can place n queens, the only problem
is finding one of the many solutions. In the problem at hand, you dont know beforehand
how many "queens" you can put; you loose some squares to the walls, and in return
the walls typically offer the possibility to put more than n.
BTW the maximum seems to be n*n/2 (putting a wall on all the squares of one color).
|
|
|
|
|
I agree with you totally on the number of queens that could be placed on this board due to wall constraints, this is why I suggested a modified version of n queens. The wall constraints could easily be taken into account and still allow for the same "Basic" n queens algorithm to function correctly.
|
|
|
|
|
I was thinking today that it should be relatively easy to implement lock free data structures using Thread Local Storage but surprisingly Google didn't reveal anything that really stood out or even a library of basic data structures that have been built using this.
Is there something I am missing?
I always think that the idea of a compiler that compiles another compiler or itself is rather incestuous in a binary way. - Colin Davies
My .Net Blog
|
|
|
|
|
Hi,
thread local storage offers storage that is private to the thread.
When threads cooperate, they have to share data; thread local data does not help here,
it prevents sharing.
To share data safely most often one needs a synchronization mechanism; a lock is one
example thereof.
|
|
|
|
|
Of course, thanks for clearing that up
I always think that the idea of a compiler that compiles another compiler or itself is rather incestuous in a binary way. - Colin Davies
My Blog
|
|
|
|