Vandaag heb ik animatieles gegeven in de Leonardo school. Kind1 gaat hier volgend jaar ook heen. Grappig om al even de sfeer te proeven.
Ik heb ze erg veel verteld in een uur, maar ik hoorde geen klachten:
http://www.snoep.at/animation/lesson1/
We hebben zelfs al samen een animatie(tje) gemaakt om een beetje gevoel voor timing te krijgen.
dinsdag 12 maart 2024
zondag 19 augustus 2018
Is Trump too orange to be human?
Introduction
On several sites on the internet you can now use AI services, such as services to blow up pictures, enhance them, detect nudity and colorize black and white photos using Neural Networks.So I thought I'd use this server, to test the theory: Is Trump too orange to be human?
Experiment 1
Ground Truth:I used photoshop to make a black and white version of this image. Then I asked the site to colorize it.
Result:
Normal skin color on president Trump.
Differences:
If we make a differences image to analyse the mistakes the AI made, you can clearly see where the AI went wrong:Experiment 2
Ground Truth:Result:
Again, if we make a differences image to analyse the mistakes the AI made, you can clearly see where the AI went wrong:
It gave the Oompa Loompa's brown hair instead of green
It miscolored Willy Wonka's hat.
With the Oompa Loompa's skin color, the same happened as with Trump's. The biggest mistakes (darkest area in differences image) were with the skincolor.
Conclusion
If you classify Oompa Loompa's or Trump as normal human beings, you end up getting the wrong picture.
Sources
Photo's:
- http://hollywood-elsewhere.com/2005/07/charlie-smells/
- https://isitfunnyoroffensive.com/stop-calling-me-orange/
Colorizing algorithm:
- https://demos.algorithmia.com/colorize-photos/
maandag 9 juli 2018
Bitcoin, again?
Hi.. remember when I predicted BitCoin would drop all the way to 5000,- euro. And then it would continue climbing.
Well it's happened.
About a month ago Bitcoin was at 5041,- euro. And again at 30/6 it was 5050
Since then it has been climbing and is now at 5700,-
Not the steep climb that it had earlier, but that wasn't healthy, like I predicted: it had to collapse..
Meanwhile a lot has been happening taking care of the drawbacks of bitcoin.
Well it's happened.
About a month ago Bitcoin was at 5041,- euro. And again at 30/6 it was 5050
Since then it has been climbing and is now at 5700,-
Not the steep climb that it had earlier, but that wasn't healthy, like I predicted: it had to collapse..
Meanwhile a lot has been happening taking care of the drawbacks of bitcoin.
- The Lightning network makes cheap and fast payments possible.
- Segwit is widely adopted
- Regulations are in place in most places, so we get a more stable course. Pump and Dump is less easy.
- OffChain transactions are being made more safe (revokable!) and easier and even faster and
- More and more businesses are looking into blockChain, understanding it and aren't affraid of bitCoin anymore.
So a lot can happen, but I'd say by the end of 2018 we will be back above the 10.000,- and steadily climbing.
Just saying.
Labels:
10.000,
bitCoin,
blockChain,
euro,
lightning,
offchain,
prediction,
regulations,
segwit
dinsdag 17 april 2018
Ultimate HTML color sanitation in PHP
How to sanitise a HTML-COLOR in PHP?
That's become rather difficult, with rgb and hsl colors, as well as short color values and long color values. It took me a 20 minutes, but this regex is ALMOST perfect..https://regex101.com/r/A2IjNO/26
in PHP:
$col="#fff";
$col=preg_replace("/[^a-fA-F0-9\#(),.%rgbhsl]/",'',$col); // only leave legal characters!
if(!preg_match("/^(\#[\da-f]{3}|\#[\da-f]{6}|rgba\(((\d{1,2}|1\d\d|2([0-4]\d|5[0-5]))\s*,\s*){2}((\d{1,2}|1\d\d|2([0-4]\d|5[0-5]))\s*)(,\s*(0\.\d+|1))\)|hsla\(\s*((\d{1,2}|[1-2]\d{2}|3([0-5]\d|60)))\s*,\s*((\d{1,2}|100)\s*%)\s*,\s*((\d{1,2}|100)\s*%)(,\s*(0\.\d+|1))\)|rgb\(((\d{1,2}|1\d\d|2([0-4]\d|5[0-5]))\s*,\s*){2}((\d{1,2}|1\d\d|2([0-4]\d|5[0-5]))\s*)\)|hsl\(\s*((\d{1,2}|[1-2]\d{2}|3([0-5]\d|60)))\s*,\s*((\d{1,2}|100)\s*%)\s*,\s*((\d{1,2}|100)\s*%)\))$/i",$col))
{
$col="notacolor";
}
echo "COLOR: $col";
/* just to make that VERY long regex a little clearer!
if(!preg_match("
^(
\#[\da-f]{3}
|\#[\da-f]{6}
|rgba\(
((\d{1,2}|1\d\d|2([0-4]\d|5[0-5]))\s*,\s*){2}
((\d{1,2}|1\d\d|2([0-4]\d|5[0-5]))\s*)
(,\s*(0\.\d+|1))
\)
|hsla\(
\s*((\d{1,2}|[1-2]\d{2}|3([0-5]\d|60)))\s*,
\s*((\d{1,2}|100)\s*%)\s*,
\s*((\d{1,2}|100)\s*%)
(,\s*(0\.\d+|1))
\)
|rgb\(
((\d{1,2}|1\d\d|2([0-4]\d|5[0-5]))\s*,\s*){2}
((\d{1,2}|1\d\d|2([0-4]\d|5[0-5]))\s*)
\)
|hsl\(
\s*((\d{1,2}|[1-2]\d{2}|3([0-5]\d|60)))\s*,
\s*((\d{1,2}|100)\s*%)\s*,
\s*((\d{1,2}|100)\s*%)
\)
)$i
",$col));
*/
How do you use it?User can input ANY string and ONLY valid colorstring parts will pass. So it will pass:
#fff;
#ff8800
rgb(255,15,0)
rgba(255,15,0,0.5)
hsla(208, 56%, 46%, 1)
hsl(0, 100%, 100%)
If it doesn't pass in the above example the string: notacolor is given to $col.
HOW IT WORKS
We work in two steps, first step is to ONLY allow the characters: abcdefgrABCDEFGR.()hlsHLS #0123456789. We replace anything that is not those characters with a "".Then we match the result with ANY of the legal color patterns. If that doesn't work, then BANG, you get 'notacolor'.
This way, if the user makes an obvious typo, it will be forgiven like "#000" => #000 would still work, but get's cleaned up.. Also things like: rgb( 5 , 15 , 255 ) which is legal will be rewritten as: rgb(5,15,255) saving precious bytes.
Now in theory a hacker could still do a thing like: rgba(0,0,0,0.000000000000000......), which would pass as legal, so if you REALLY want to make it safe from overflow-type-attacks, checking the length of the string would be a good idea too. But that goes without saying.. that's always a good idea..
You cannot do it with a match alone, because then "#fff<script alert('oops')></script>" would be a legal string. In our case this would become: #fffrar()r, which is NOT a color so it would become 'notacolor'
NOTE:
At first I thought about using an inverse pattern of the above match to preg_replace anything NOT legal for colors.., but that proved to be more difficult than I cared for and it would probably be quite slow, because of the need to negate a | operator. Also, I don't think regex HAS a & operator, so negation might be impossible.. Anyway..
Disclaimer:
- I didn't build it on my own, there where 24 tries before me to study and use parts of. But this seems to be the first to pass all tests for the above cases. I am just proud to be of use :)
- The only thing it doesn't validate is things like: red..
Which is a valid color code.
The complete list is here:
https://www.w3schools.com/tags/ref_colornames.asp
I just think it defeats the purpose to check this list with a regex.
It can be done much more transparent with a in_array() check.
When do we use this?
Not much, the color input from HTML5 will give you a nice #555555 value and doesn't even support rgba colors (yet). But the fallback is an ordinary text-input, so we need to protect ourselves.This regex is just for the future, when the color input will support alpha-colors and hsl colors as well.
I am building a framework that I'd like to think I'll use for the coming 10 years.
zondag 25 maart 2018
Advanced platform game level generation using Neural Nets
Basically what I want is to generate a platform game from a very limited black and white tile set, then do a pix2pix or style-transfer generation and have something similar to this as a result..
from an input like this:Generating the Black and White image
I first made an algorithm to generate the maze, there is many out there. This is a normal tilebased platform game type map. Then I made an algorithm that generates the lines that break up the boring blocks, but basically keep the same shape. It makes the level look a bit techno and at least a bit more interesting and hides the fact that it is a tile-based level.. This was a bit harder, but I think it's still pretty basic, so I'll let you figure that one out yourself. The new thing is how I got to use deeplearning, using all the great libraries out there like deeplearn.js and p5.
Creating the environment
I drew the first image myself, using neural nets to generate and machine-parts for this sci-fi type game from the original black and white image. The technique used is often called a style-transfer and is based on google's original deep-dream algorithm.
I used pictures of the insides of whatches and a basic machine-texture that I found after some experimenting. It basically turns ANYTHING into a machine.
Having a tile as a base gives a certain predictability to both level-topology and the thinnest possible lines (or smallest details in the final image)
I got a lot of different outputs:
I used pictures of the insides of whatches and a basic machine-texture that I found after some experimenting. It basically turns ANYTHING into a machine.
Having a tile as a base gives a certain predictability to both level-topology and the thinnest possible lines (or smallest details in the final image)
I got a lot of different outputs:
Then by incepting these images and using them (or mixed versions of them) as inputs for yet another style transfer I got some even weirder, less mechanical looking ones..
Then I used photoshop to mix all nice input together.
So that image is part Photoshop and part Neural net..
Rendering in sections of 256x256
I kind of see this as an environment. Or an athmospere. You could draw the same input in many ways, to get the different environments needed in a typical gamemap.
For now, I limit myself to one environment. Once I have this to my liking in photoshop I export the styled level. And I do a style transfer to the next section. Pix2Pix can only do small pictures well, so I limit myself to 256x256 sections..
For now, I limit myself to one environment. Once I have this to my liking in photoshop I export the styled level. And I do a style transfer to the next section. Pix2Pix can only do small pictures well, so I limit myself to 256x256 sections..
Even though this is better than I ever expected (giving as I lowered the size of the test file even further for speed), the sections don't exacty line up and you get a little line in between. The answer to this is to render a section inbetween..
This section doesn't really line up with the other two sections, but it allows me to fade out the edges and create a seamless huge map.
Also this will in future make it possible to blend styles together seamlessly. (I hope)
Thought I'd share how I'm trying to make even better game-art with NeuralNets.
Thought I'd share how I'm trying to make even better game-art with NeuralNets.
Memory conservation
Now all this can be done automatically in the browser of the player, making the map that needs to be transfered to the player an ordinary tilemap, which could even be compressed as a gif.
I see MANY advantages in this technique.
I see MANY advantages in this technique.
zaterdag 10 februari 2018
Wait until you see, the white of their eyes..
Ok, I've been waiting for the right moment to start buying bitcoin again. Buy the dip, right?
But that only works well, if you know when the dip ends..
Is the end of the fall here yet..?
I told myself when it was at 16.000,- euro's, that I'd start buying again when it hit 8000,- euro's. (or 50%) But it didn't feel right. So I didn't..
That moment has long gone, but now I was a bit at a loss..
So I took my original projection from 20-11-2017
and put the most recent course on that (purple line below in the next paragraph). As you may remember, I started warning for a crash, the moment we hit that green line on top. We went way further through than I could imagine, and so I think we will see at least very close to a maximum dip right now. But what is the maximum dip (or minimum) and when will it be?
We might also see some more regulation, which will probably scare people of.
But the moment to start buying according to my original predictions would be:
at 4610,- euro's which will occur at 19/02/2018 at 19:00 hours ( :) ). That is WAY to precise to be learned from such a graph, but I might be exactly right, how cool would that be?

But.... to be honest... I have the feeling the low will be later and lower than I first predicted, because the high was so much later and higher than I predicted..
I've decided to wait it out at least until 19/02/2018 OR 4610,- euro's, whichever comes first.
I think 4600,- euro's must be possible considering how enormous the positive spike was and anyway it's easier to remember than 4610.
Well 60% less than expected would be 40% of 4600,- so: 1840,- euro... Jaaaaiks.
Yes, I'll definitely hold of.. Maybe my dream of holding one complete bitcoin again will come to pass (again).
If anyone is still interested, if my original projections were correct, the Winklevoss twins will see their prediction of 320.000,- dollar, or about 260.000,- euro's by 1/10/2019 according to my schedule.
Wouldn't that be amazing! But since they said by 2020, it seems I'm even a bit more positive than they are. However, they advice you to buy now.. I'm not there yet.
Anything you put in at 1840,- (somewhere around 01/04/2018 if the present fall continues) will then be at 14100% profit by 2020.
A quick comparison..
So buying at 1840,- for 100,- euro will give you 14.100,- euro by 2020
at 4600,- it will be a 5600% profit (100,- -> 5.600,- euro)
and at 3700% profit if you buy NOW at 7000,-. (100,- -> 3.700,- euro)
This is presuming fiat-currencies haven't crashed by 2020.. The buying power of 14.100 euro might be not much different from 1000,- euro now.. (Yes, I said that!)
Yeah.. I'm gonna mostly wait it out... maybe buy a bit.. to spread my risks.
Especially because the fees are still very high, which makes it stands to reason to buy all you want to buy in one go at the lowest point.
It's just hard to find that lowest point. But I was remarkably accurate in my predictions so far.. (only off by 60%, haha)
Hope this helps you decide a bit what you want to do with cryptocurrency.
it's from the financial times of last year.. from when bitCoin was around 5000 dollars.
It didn't turn out to be right. I don't think they took into account, bitCoin has been acting normally only on log-paper..But maybe there is still something we can learn?
Looking at the classic bubble, this is basically what I'm talking about. I think the blue line (in my graph) is the median (the dotted line in this graph), only it's still exponential.
The rest is pretty standard. But look at what happens AFTER the 'Despair' period... It rises again and pretty steeply. In fact, if you look at previous bubbles, we see a lot of companies went on to make a LOT of profit. (Of course a lot of them never got out of the despair phase and died, which is what happens when that line hits 0..)
But I think there is a hard core community for bitCoin, which won't ever allow it to go below 500,- , no matter what happens. Those are the idealists and they carried the coin for 5 years already, they don't scare easily... So going to 0 isn't really an option I.M.O..
So if I'm right, the whole question is WHERE in the despair period are we.. And I'm betting we just started it.
But let's see what happens between now and 19/02/2018 or even april 2018, which is, unless amazing things happen in the meantime, when I hope to post about bitCoin again, telling you I just bought at 1800,- :).
But that only works well, if you know when the dip ends..
Is the end of the fall here yet..?
I told myself when it was at 16.000,- euro's, that I'd start buying again when it hit 8000,- euro's. (or 50%) But it didn't feel right. So I didn't..
That moment has long gone, but now I was a bit at a loss..
So I took my original projection from 20-11-2017
and put the most recent course on that (purple line below in the next paragraph). As you may remember, I started warning for a crash, the moment we hit that green line on top. We went way further through than I could imagine, and so I think we will see at least very close to a maximum dip right now. But what is the maximum dip (or minimum) and when will it be?
Where and when will the minimum be?
I still think the minimum will be at the moment we hit the red line. (yellow line projects current drop to that point) We may go a bit deeper, because the high was so high and the ensuing panic may have scared a lot of people of or poisoned them against the concept of de-centralised (non-fiat) currencies and transactions (not blockchain or DAG/tangles per se, which most people can agree upon is a good thing).We might also see some more regulation, which will probably scare people of.
But the moment to start buying according to my original predictions would be:
at 4610,- euro's which will occur at 19/02/2018 at 19:00 hours ( :) ). That is WAY to precise to be learned from such a graph, but I might be exactly right, how cool would that be?

But.... to be honest... I have the feeling the low will be later and lower than I first predicted, because the high was so much later and higher than I predicted..
I've decided to wait it out at least until 19/02/2018 OR 4610,- euro's, whichever comes first.
I think 4600,- euro's must be possible considering how enormous the positive spike was and anyway it's easier to remember than 4610.
Is that enough margin for error?
It went 6000,- euro's over my maximum. Which at that point was 60% more than I ever expected.Well 60% less than expected would be 40% of 4600,- so: 1840,- euro... Jaaaaiks.
Yes, I'll definitely hold of.. Maybe my dream of holding one complete bitcoin again will come to pass (again).
Winklevoss Twins prediction
The winklevoss Twins made an outrageous prediction (or so people say)..If anyone is still interested, if my original projections were correct, the Winklevoss twins will see their prediction of 320.000,- dollar, or about 260.000,- euro's by 1/10/2019 according to my schedule.
Wouldn't that be amazing! But since they said by 2020, it seems I'm even a bit more positive than they are. However, they advice you to buy now.. I'm not there yet.
Anything you put in at 1840,- (somewhere around 01/04/2018 if the present fall continues) will then be at 14100% profit by 2020.
A quick comparison..
So buying at 1840,- for 100,- euro will give you 14.100,- euro by 2020
at 4600,- it will be a 5600% profit (100,- -> 5.600,- euro)
and at 3700% profit if you buy NOW at 7000,-. (100,- -> 3.700,- euro)
This is presuming fiat-currencies haven't crashed by 2020.. The buying power of 14.100 euro might be not much different from 1000,- euro now.. (Yes, I said that!)
Yeah.. I'm gonna mostly wait it out... maybe buy a bit.. to spread my risks.
Especially because the fees are still very high, which makes it stands to reason to buy all you want to buy in one go at the lowest point.
It's just hard to find that lowest point. But I was remarkably accurate in my predictions so far.. (only off by 60%, haha)
Hope this helps you decide a bit what you want to do with cryptocurrency.
I.C.O. Byteball
I bought some byteball. Not much. Toe in the water.
Even though the system byteball uses is wildly different from the blockchain, it still follows the bitCoin course rather closely. Way more closely than I hoped, I made some profit but it's really small. It kind of strengthens my idea that I.C.O's are not for me..
Classic Bubble
I don't know if you saw this graph:
it's from the financial times of last year.. from when bitCoin was around 5000 dollars.
It didn't turn out to be right. I don't think they took into account, bitCoin has been acting normally only on log-paper..But maybe there is still something we can learn?
Looking at the classic bubble, this is basically what I'm talking about. I think the blue line (in my graph) is the median (the dotted line in this graph), only it's still exponential.
The rest is pretty standard. But look at what happens AFTER the 'Despair' period... It rises again and pretty steeply. In fact, if you look at previous bubbles, we see a lot of companies went on to make a LOT of profit. (Of course a lot of them never got out of the despair phase and died, which is what happens when that line hits 0..)
But I think there is a hard core community for bitCoin, which won't ever allow it to go below 500,- , no matter what happens. Those are the idealists and they carried the coin for 5 years already, they don't scare easily... So going to 0 isn't really an option I.M.O..
So if I'm right, the whole question is WHERE in the despair period are we.. And I'm betting we just started it.
But let's see what happens between now and 19/02/2018 or even april 2018, which is, unless amazing things happen in the meantime, when I hope to post about bitCoin again, telling you I just bought at 1800,- :).
maandag 8 januari 2018
Bitonic is wel erg positief.
Hier boven
zie je het verschil in interpretatie tussen bitcoin.nl en bitcoinspot.nl.
Bitcoinspot spreekt van 1141 euro daling, bitcoin.nl van 893 euro stijging.
Als ik de grafiek zo zie, ben ik het eens met bitcoinspot..
zie je het verschil in interpretatie tussen bitcoin.nl en bitcoinspot.nl.
Bitcoinspot spreekt van 1141 euro daling, bitcoin.nl van 893 euro stijging.
Als ik de grafiek zo zie, ben ik het eens met bitcoinspot..
zondag 17 december 2017
BITCOIN, PICK YOUR PREDICTION..
Predictions are tricky business.
So, I'm going to let you do the hard work..
There seem to be two opinions..
BITCOIN WILL SOAR, like this...
...and reach $1.000.000 somewhere in 2023. If you look at the graph of the ALL time course up to now, this seems quite reasonable, even if it is about the same time that bitCoin has been on the market, that it has to survive. Maybe the future market WILL stabilise the bitCoin and is will follow a straight line (on log-paper, that is) to that million ..or like this....
Wait, what? It could also grow to a million in just 3 years? Well yeah, this looks just as convincing, but that's kind of the problem.. What do and what don't you take into account.
I just made these two graphs, to show you both can be convincing. I don't know what's going to happen. No one does.. So WHY do so many people say...
BITCOIN WILL CRASH...
...and will drop to less than 1 dollar bij 2020? (Or even faster). This is what a bubble would be, they say.. But this is discontinuous and I'd say the burden of proof lies with someone expecting something discontinous to happen.. Looking in logarithmic space, bitcoin has been pretty consistent even with potentially catastrophic events, like the mtGox hacking or a recent ban in China.
What event could spark this downfall? What could be big enough?
There are plenty of candidates, the trouble around bitfinex seems to be the latest fad. All these things are showing in the price, but it's always kept going..
Also if you look at the historic data of bitCoin, you see quite a few crashes.. Bitcoin dropping to a quarter of it's former price in a matter of days. Now some will say, we are waiting for a disaster, but every time up to now, they were proven wrong. This has happened 3/4 times allready.
There are plenty of candidates, the trouble around bitfinex seems to be the latest fad. All these things are showing in the price, but it's always kept going..
Also if you look at the historic data of bitCoin, you see quite a few crashes.. Bitcoin dropping to a quarter of it's former price in a matter of days. Now some will say, we are waiting for a disaster, but every time up to now, they were proven wrong. This has happened 3/4 times allready.
BITCOIN WILL DIVERSIFY..
Obviously both predictions are a bit short sighted.. So we might need a new model...
I stated earlier that there is some logic to bitCoins exponential growth, because the marketing is similar to that of a social Media platform. So maybe we should look at those platforms.. Like Facebook.
Looking at this historic data of photo's shared on Facebook. Facebook's inital run was exponential, up until 2011. Then it started growing at a much slower rate. But something else happened. Facebook started buying other brands and expanding its own technology to share photo's. And if you look at the growth of that blue/green stack, it's still exponential..
I think something similar will happen to bitCoin. There will be platforms that build on bitCoin, like LiteCoin, there will be new technology, like ByteBall/IOTA's DAG and bitCoin itself will improve.
Hodling will bring you some of the profits, but not all. We have to keep on the lookout for something better.
The king is dead, long live the king...
And then there are the believers, who say that after a bubble pops, the future still looks bright..
Look at internet they will say.. It crashed (dotcom-bubble), but after that, it continued growing at a more reasonable rate..
Google Trends
Maybe, when we look at the interest in bitCoin on google Trends we can get some insights.. It seems interest was growing exponentially and then in december suddenly cooled a lot..
Still this did not result in much of a pricedrop. (Even if I hoped it would..)
vrijdag 15 december 2017
15.000 euro, geen probleem
Op het moment van schrijven is de gemiddeld bitcoinkoers 14943.90 dat is geheel tegen mijn voorspellingen in. Hetgeen maar weer laat zien, dat ik er ook niks vanaf weet :)
Bij www.bitcoin.nl hebben ze een leuke graph (en veel extra info!), maar let wel op: ze ronden stevig af, waardoor de koers minder volatiel lijkt.
Op deze site:
https://99bitcoins.com/price-chart-history/
kun je de volgende kaart zien:
Ik ben dus niet de enige, die de conclusie trok, dat we moesten kijken naar exponentiele functies. Dit is de GEHELE koers, dus over 6 jaar. Vanaf het eerste moment dat er bitcoins verkocht konden worden, uitgezet op logaritmische schaal. Kijk maar naar de schaal: 0.01, 1,100,10.000,-
Daarop zou een exponentieel verloop een rechte lijn moeten zijn.
Dat is het niet helemaal, er zijn uitschieters, maar grappig genoeg is onze huidige uitschieter vrijwel onzichtbaar...
Dit komt, omdat het volgende streepje 1.000.000,- is!
Volgens deze grafiek zou de bitCoin dat over een jaar of 4/5 kunnen bereiken. Ongelooflijk, maar als je het op deze schaal bekijkt, verdwijnt de bobbel waar ik me zo'n zorgen over maakte..
Het is een herstel van de oude koers op langere termijn.
Dus... wellicht toch geen bitCoin Crash??? Keek ik naar niet genoeg data?
Ik ga toch maar weer voorzichtig wat bitcoins kopen, ondanks de aankomende futures-beurs morgen.. want ook al koop ik maar 0.02, als hij straks een miljoen waard is, is dat toch weer 20.000,- en dan wil ik ook wel 'hodl'en.
Zo en nu maar hopen, dat hij vandaag nog door de 15.000,- euro gaat :)
De amerikanen zitten natuurlijk op de 20.000,- dollar (nu op 17784) te wachten, maar ik hou het voorlopig op eigen bodem.
Bij www.bitcoin.nl hebben ze een leuke graph (en veel extra info!), maar let wel op: ze ronden stevig af, waardoor de koers minder volatiel lijkt.
Op deze site:
https://99bitcoins.com/price-chart-history/
kun je de volgende kaart zien:
Ik ben dus niet de enige, die de conclusie trok, dat we moesten kijken naar exponentiele functies. Dit is de GEHELE koers, dus over 6 jaar. Vanaf het eerste moment dat er bitcoins verkocht konden worden, uitgezet op logaritmische schaal. Kijk maar naar de schaal: 0.01, 1,100,10.000,-
Daarop zou een exponentieel verloop een rechte lijn moeten zijn.
Dat is het niet helemaal, er zijn uitschieters, maar grappig genoeg is onze huidige uitschieter vrijwel onzichtbaar...
Dit komt, omdat het volgende streepje 1.000.000,- is!
Volgens deze grafiek zou de bitCoin dat over een jaar of 4/5 kunnen bereiken. Ongelooflijk, maar als je het op deze schaal bekijkt, verdwijnt de bobbel waar ik me zo'n zorgen over maakte..
Het is een herstel van de oude koers op langere termijn.
Dus... wellicht toch geen bitCoin Crash??? Keek ik naar niet genoeg data?
Ik ga toch maar weer voorzichtig wat bitcoins kopen, ondanks de aankomende futures-beurs morgen.. want ook al koop ik maar 0.02, als hij straks een miljoen waard is, is dat toch weer 20.000,- en dan wil ik ook wel 'hodl'en.
Zo en nu maar hopen, dat hij vandaag nog door de 15.000,- euro gaat :)
De amerikanen zitten natuurlijk op de 20.000,- dollar (nu op 17784) te wachten, maar ik hou het voorlopig op eigen bodem.
donderdag 7 december 2017
Ok, what's going on?
Ok, ik had het FOUT. Nog geen bitcoinCrash.
Maar ik hoop dat jullie met me eens zijn, dat dit geen gezonde groei meer is. Er is iets heel geks aan de hand en ik vertrouw het niet.
Dat gezegd hebbende, heb ik toch weer wat in bitCoin gestopt, niet veel, maar dit wil ik meemaken.
Een week geeft je nu 30% groei van je kapitaal.
Wel oppassen, de 10e wordt de futures markt voor Bitcoin geopend. Dan kunnen mensen geld verdienen aan een dalende koers. De conspiracy-theoretici denken dat deze laatste absurde groei komt door malefide praktijken, bekend als het masseren van de markt (alvorens je de boel laat knappen). Ik sluit het niet uit.
We gaan het zien. Ik laat wat er nu inzit lekker zitten. Wie weet wat er gebeurd.
Maar het is eigenlijk tegen beter weten in.
Hij schiet zo snel omhoog, dat ik er geen ruimte voor had gehouden in mijn toch wel HEEL ruime grafiek. En sneller dan mijn snelst geprojecteerde koers.
Ik blijf het gevoel hebben dat we nu binnenkort keihard gaan dalen, misschien wel weer tot de 5500,-
zondag 3 december 2017
BitCoin Crash, any moment now. Wait for it...
Any moment now..
The dark green line is the exchange rate from when I made this prediction (see previous post). (The prize of bitCoin is in Euro's), the dark yellow line is what happened since then. It's grown more than exponentially or the exponent changed temporarily. That's usually followed by a quick correction to the blue line or below to the lower RED line!
We have seen crashes in the prize of bitCoin every time that green line was hit over the last two years.. And a few times when it was just getting too close.
01/04/2017 it even went down all the way to the red line.. This would mean a value of 3800,- at present time.
Buy again in 2018 or when it reaches 8000,- euro
I still believe..Everytime the bitcoin has recovered. But as of this moment, I no longer have any bitCoin.
It reached my green line.. I'm waiting for the red line to happen.
And I plan to start buying again at 8000,- euro (9 498,05 dollars) while it's going down somewhere into the new year.
The last time we went OVER the line bitcoin lost a third of it's value in the space of a week. Let's hope that doesn't happen that quick this time. Because people are going to lose their money.
I might be TOTALLY wrong..
All I'm saying is: just don't put all your money in bitCoin JUST NOW!
I'm a blockchain believer, I'm even a bitCoin believer, (not an altcoin believer though, not in the long run...) Please be carefull.
I posted in English, makes it easier to share.
Voor de hollanders: ik heb het even in het Engels gedaan. Dit kon wel eens belangrijk zijn voor iedereen en dat maakt het makkelijker om te delen.
Labels:
2018,
any moment now,
believer,
bitCoin,
bitcoincrash,
bitCrash,
blockChain,
correction,
crash,
euro,
exchange rate,
exponential,
illustration,
immanent,
prediction,
prize
maandag 20 november 2017
Bitcoin vandaag meer dan 7000!
KORT:
Ik voorspel voor februari 2018 dat we de 10.000,- euro grens doorbreken. Hieronder staat uitgebreid waarom ik daar voor mezelf zeker genoeg van ben om er enig geld in te steken.Goed, dat is een 42% groei van wat je er nu instopt. Dat krijg je niet als rente bij de bank.
Het risico: wellicht raak je al je geld kwijt.
Dus... als ik dat wel wil gokken met een klein bedragje, hoe doe ik dat dan?
Verrassend simpel.
Wat is eigenlijk betalen met BitCoin (BTC)?
Voor betalen met bitcoin maak je een bitcoin-wallet aan met een wachtwoord. Dat is een beetje als een email adres. Je kunt dan betalen met een telefoon, waarop een wallet-programma staat. Daar zijn er vele van, net als er veel e-mail Clients zijn. Maar zelfs zo technisch hoef je niet te worden.Je kunt bitCoin kopen, zonder wallet op je telefoon en zonder er ooit mee te betalen.
Je moet WEL zorgen dat je bitCoins niet gehacked kunnen worden, want je bent zelf de bank. Niemand anders beschermt je. Dat is een veelgemaakte fout, waardoor hackers nu relatief veel BitCoins stelen van beginners.
Investeer dus eerst in een 'kluis'. Een speciale USB stick, waar de bitcoins op worden bewaard en dat je wachtwoord voor je bitcoin-wallet wordt afgeschermd.
Moet ik 1 BitCoin kopen, dat is toch heel veel?
Nee, dat hoeft helemaal niet.. BitCoin kent ook centen en zelfs nog veel kleinere eenheden. De kleinst mogelijke investering nu is: EURO 8,98 of BTC 0,001 bitCoin (maar als je zo weinig koopt, zijn de percentages voor omwisselen belachelijk, maar het gaat nu even om het principe..)Bitcoins bewaar je het veiligst in je digitale 'Kluis'
Een kluis is een stukje hardware (een apparaatje als een USB stick), waar je je BitCoin op kunt bewaren. je kunt het ook op je harde schijf, online of op papier. Maar kluizen zijn veiliger tegen hackers EN inbrekers.Voorbeelden van 'kluizen' vind je op bitcoin.org
https://bitcoin.org/en/wallets/hardware/
Op dit moment lijkt Trezor de beste te zijn qua features, maar het wisselt snel. Allemaal zijn ze veilig.
In deze 'kluizen' kun je je bitCoins veiliger bewaren, dan geld in de bank, geen hacker kan erbij.
De bitBox heeft zelfs beveiliging tegen daadwerkelijke inbraak, las ik.
Kosten varieren van een paar tientjes tot een paar HONDERD euro.
Om te beginnen raad ik er een van een paar tientjes aan.
Je wacht tot je apparaatje bezorgd is (dat kan even duren, want iedereen wil bitcoins.. ik zou dus VANDAAG je kluis bestellen.. Dan kun je je ook nog even rustig inlezen, terwijl je daarop wacht.)
Je plugt het in je computer, stelt een wachtwoord in en installeert de wallet-software die bij je apparaat komt.
Daarmee krijg je op je desktop een wallet waarmee je geld kan ontvangen EN versturen.
Kopen
En dan ga je naar Bitonic.nl en koop je voor het bedrag dat je wilt besteden BitCoins met iDeal.Je ziet direct, hoeveel bitCoin je daarvoor krijgt. Dat aantal wisselt met de 15 seconden als er een nieuwe koers bekend is. Die koers kun je vergeten op het moment dat je koopt. Al duurt het misschien even voor je BitCoins er zijn, Bitonic garandeert de koers op het moment van aankoop.
Bitonic rekent een flinke fee, maar dat maakt niet uit. Koop eerst maar eens voor 15,- of 50,- euro, gewoon om het proces te zien..
Een van de vragen die je bij het afrekenen wordt gesteld is: geef je bitcoinadres.
In je desktop kluis-app ga je naar ontvangen en kopieert het adres dat daar staat. Dat is een lange sliert van cijfers en letters. Je plakt dat in het veld van Bitonic.
En dan druk je op kopen en reken je af met iDeal. Doodsimpel.
Dan duurt het even, voor je BitCoins binnen zijn. Soms wel 10 minuten. Dat is dan even eng, zeker als je net een flink bedrag hebt afgerekend.
Gaat er iets mis, dan stort Bitonic.nl gewoon weer terug op je rekening, dus geen zorgen.
Sterker nog, laat het maar eens misgaan (door expres een verkeerd adres op te geven), dan krijg je vertrouwen. Bitonic is de oudste van de Nederlandse BitCoin-wisselaars (meer dan 4 jaar oud).
Dan zie je uiteindelijk in je wallet hoeveel bitcoin je beschikbaar hebt.
Op het moment van schrijven zou dat iets van 0.00677734 BitCoin zijn. Dat lijkt weinig, maar het is: 677,734 Satoshi. (Zeg maar de CENT van de BitCoin alleen gaat het hier om miljardsten).
En dan wacht je een paar dagen en je kijkt op deze site wat de koers doet. Ik noem deze omdat ik ze een mooie grafiek vind hebben en omdat ik die hieronder heb gebruikt voor mijn koersberekening.
En dan ga je naar Bitonic.nl terug om te verkopen op het moment dat het je uitkomt.
Er zit verschil in de koers die je zelf kan vinden op internet en het bedrag dat je van Bitonic krijgt.
Initieel sta je dus vrijwel altijd op verlies, want Bitonic wil ook wat verdienen.
Maar zoals het nu gaat is dat verschil bij een voldoende bedrag (zeg 300 euro) in een uur alweer opgelost.
Koers
De BitCoin koers is zeer wisselend door het kleine volume. Daarom kijk ik naar de investering op de langere termijn. De koers van de BitCoin gedraagt zich al 2 jaar als een exponentiele functie.. (Weet je nog met wiskunde y=x tot de macht n..?Met een beetje klooien is het makkelijk de formule op te stellen voor de onder en bovengrenzen van de grafiek en daar het gemiddelde van te nemen. Als ik deze plot krijg ik het volgende plaatje (klikken om uit te vergroten, het zijn dunne lijntjes):
![]() |
| Koersprojectie bitcoin, hoog,laag en middel met projectie naar 10.000,- euro moment. De groene bitCoinAverage koerslijn stopt op 20-11-2017 en de grafiek begint op 20/11/2016 en stopt op 1/10/2018 |
Natuurlijk komt er een keer een eind aan deze explosieve groei, het is logisch dat je daar rekening mee wilt houden, maar ik geloof dat hij zich voorlopig (de komende drie jaar) zo zal blijven gedragen:
- De bitCoin is een verschijnsel op het vlak van SocialMedia geworden. En hij gedraagt zich in de groei, zoals deze platformen groeiden in het verleden.
- De bitCoin heeft nog alle groeiruimte. De huidige marketCap (totale hoeveelheid geld in omloop als BitCoin) is maar een $137,400,000,000 dollar, terwijl goud bijvoorbeeld $7.070.000.000.000.000.000 dollar in omloop heeft. Dat is een fractie van 1/19.000.000.000 Groeiruimte genoeg.
- Tegen de tijd dat de bitCoin de helft van deze marketCap bereikt, verwacht ik pas weer enige afzwakking in de groei. In 2015 had de bitcoin een waarde van ongeveer 300 euro en was de marketcap rond de 60.000.000.000. We zijn dus nu 2x zo groot gegaan met een prijsstijging van 20x. Zet die lijn door en de bitCoin gaat niet afzwakken in groei, totdat hij 26x deze slag heeft gemaakt. De totale waarde van 1 bitCoin is dan conservatief geschat bijna een miljoen euro waard. Zelf vermoed ik dat hij dan langzamer doorstijgt tot een totaal van 200 miljoen euro voor 1 bitCoin. (En dat in ongeveer 25 jaar)
- Kortom, als ik nu 1 Euro investeer, zou ik uiteindelijk 142,- Euro moeten hebben in bitCoin, voordat deze afzwakking van de curve te verwachten valt.
- Dit alles natuurlijk, als de bitCoin niet iets gigantisch in de weg wordt gelegd, zoals wetgeving, lastercampagnes etc. Dat kan flinke deuken in de koers opleveren en eventueel zelfs de bitCoin vernietigen. Maar ik denk dat we het point-of-no-return al hebben bereikt en met mij kopstukken uit de financiele wereld.
En voor de mensen die nog meer vragen hebben:
- Dit is gerekend buiten de alt-coins (dat is een heel andere discussie), maar om eerlijk te zijn ook buiten de waarde van Euro, Dollar of kijkend naar andere valuta of bedrijven, die nu de waarde van de markt vertegenwoordigen.
- Zelf verwacht ik dat alt-coins niet zullen verdwijnen, maar nooit een vergelijkbare rol als die van de bitCoin zullen spelen. Hard Forks zullen in dit model op de lange duur altijd resulteren in altCoins die uiteindelijk een factor 1000 minder waard zijn dan de bitCoin zelf.
- Als je die laatste twee dingen niet begreep, moet je eerst wat bijlezen, voor je gaat investeren. Pas dan bijvoorbeeld op dat je niet per ongeluk BitCoin Cash (een alt-coin) koopt in plaats van BitCoin..
Hoeveel moet ik investeren?
Gerolamo Cardano (1501/1576) heeft formules gemaakt om te wedden (op de lange termijn) met een deel van het beschikbare geld bij onbekende kansen voor een zo groot mogelijk winst. Hij is een van de weinige die zinnige dingen heeft geroepen over onbekende kansen, omdat hij nog niet wist, hoe je kansen kon berekenen (die wiskunde was nog niet uitgevonden) maar wel volkomen briljant was.Zijn formules gebruik ik om uit te rekenen, hoeveel ik volgende keer weer 'inzet', waarbij ik een schatting maak van de te verwachte uitkomsten (het blijft dus schatten).
Naar mijn mening is dat de enige manier om wiskundig om te gaan met dit soort wisselende koersen.
Door me vast te houden aan deze formules, zie ik, dat ik aan de voorzichtige kant 'wed' en weinig risico loop. Dat stemt me gerust. Maar ik ben een nerd..
Uiteindelijk blijft het een kwestie van gevoel en ik denk niet dat het zinvol is, dat ik verder uitleg hoe ik mijn gevoel rationaliseer :) Wat durf je kwijt te raken? Doe het daarmee!
Ik krijg van niemand van de genoemde mensen of sites geld (was het maar waar) en ik neem ook geen verantwoordelijkheid als het fout gaat, dat blijft je eigen inschatting. Dus kom niet klagen, het is maar een projectie.
Hoe om te gaan met de sterk wisselende koers?
Toen de bitcoin voor de eerste keer erg veel was gestegen, heb ik mijn inleg in Euro's er weer uitgehaald en toch BitCoin overgehouden. Daarmee ben ik door een aantal spannende periodes gekomen, waarbij de bitcoin steeds zakte (en uiteindelijk weer steeg). Mij kon toch niks gebeuren..Maar uiteindelijk steeg hij weer, veel hoger dan het bedrag, waarvoor ik kocht (nu al bijna 2x) en had ik spijt van mijn voorzichtigheid.
Van mijn vader (die al jaren de beleggingsmarkt volgt) kreeg ik de tip dat bij een sterk wisselende koers (zoals bij de bitCoin) je beter, zeg maar iedere week een beetje erbij kan kopen, dan in een keer een groot bedrag. Je koopt als de koers daalt, je verkoopt (als je dat wilt) als de koers stijgt.
Ik ga ervan uit, dat de BitCoin gemiddeld zal stijgen de komende jaren en omdat je meerdere keren koopt, middel je de inkoop-prijs en voorkom je dat je op een piek koopt. Bij continue stijging is dat dus iets in je nadeel. Maar bij plotse daling is het in je voordeel.
Het geeft iets meer hoevast.
Verder is het gewoon in de gaten houden wat er gebeurd.
Succes.
Wie ben ik nou helemaal?
Tja, goeie vraag. Ik ben gewoon ik.Oh, en mocht je denken, waarom schrijft die gozer dit..?
- Ik ben een idealist. Ik denk dat BitCoin ons de mogelijkheden geeft om de rijkdom eerlijker over de wereld te verdelen dan nu het geval is (om tal van redenen, die lastig uit te leggen zijn en makkelijk te googlen) En ik gun een ander ook wat.
- Maar bovendien: ik ben een realist. Omdat BitCoin het patroon van social Media volgt, is BitCoin zo sterk als het geloof in BitCoin. Ik heb er belang bij dat BitCoin sterk blijft.
Of je denkt, waarom zou ik hem geloven: Hij maakt toch computer-spelletjes?
Schoenmaker blijf bij je leest.
Klopt, ik weet weinig tot niks van de kapitaalmarkt, dan wat ik de afgelopen maanden in rap tempo heb bijgeleerd. Maar ik heb wel andere kwalificaties:
- Ik snap de blockChain technologie,
- ben op dit moent ICT-security-docent,
- ken kansberekening,
- heb ervaring met social Media, en
- ik ben goed genoeg in wiskunde om een willekeurige koers te herkennen en daarna te matchen in bovenstaande grafiek.
- Bovendien heb ik de afgelopen twee maand een derde maandsalaris erbij verdiend, door een beetje in de bitCoin te investeren. Verder kun je vanaf februari 2018 bij mij spelletjes kopen met bitCoin.
Niks doen is geld verliezen?
Trek je eigen conclusies. Niks doen is ook iets doen.. Ook daarmee kun je geld verliezen.Zet je de euro uit tegen de BitCoin of in dit geval Satoshi (1 BTC is 100,000,000 Satoshi) en je schrikt je ROT.
dinsdag 10 oktober 2017
Bitcoin recovered and is up on never before seen heights..
Ik heb laatst wat geinvesteerd in de bitCoin, dat lijkt een goed idee geweest.
De bitcoin is in het afgelopen uur (weer) hoger gekomen dan ooit tevoren.
Dit ondanks allerlei naar nieuws over China en Rusland, waar men de munt probeert te verbieden.
Ik wil hier even aankondigen, dat ik vanaf volgend jaar februari bitCoin wil gaan accepteren voor mijn werkzaamheden als gameDeveloper.
De bitcoin staat nu op 4226 euro! Dus ik kan een game aanbieden voor slechts 1 bitCoin :)
Echter meer to the point denk ik aan een soort Patreon constructie, waarmee men mij met Satoshi (een miljoenste bitcoin) kan steunen op de makinggames site.
-------
English version
Recently I invested some money in bitCoins, which seems to have been a bright idea.
The bitCoin has recovered in the last hour from the vicious onslaught by China and has climbed (again) to heights never seen before.
This even though Russia has threatened to also ban the coin.
(I think this stands to reason, as this coin cannot be controlled by any government it will be the totalitarian government that will shun it first)
But what I see is that it will very soon be easier and safer to do micropayments over internet via bitCoin. (Even though there is a lot of bad press about hackers, there is a lot of danger in the exchange, but I think it can be greatly mitigated by recent developments)
So I want to take this chance to announce I will be taking bitcoin as a currency when doing business transactions starting februari 2018.
Because the bitcoin is currently at 4231 euro (it went up a bit in the time I wrote the english version) I can now offer you a complete webgame for only 1 bitCoin. :)
But more down to earth, I'm looking at micropayments for the makinggames site as a kind of Patreon structure.
I found this blog:
https://en.bitcoin.it/wiki/How_to_accept_Bitcoin,_for_small_businesses
And I'm currently working through it :)
De bitcoin is in het afgelopen uur (weer) hoger gekomen dan ooit tevoren.
Dit ondanks allerlei naar nieuws over China en Rusland, waar men de munt probeert te verbieden.
Ik wil hier even aankondigen, dat ik vanaf volgend jaar februari bitCoin wil gaan accepteren voor mijn werkzaamheden als gameDeveloper.
De bitcoin staat nu op 4226 euro! Dus ik kan een game aanbieden voor slechts 1 bitCoin :)
Echter meer to the point denk ik aan een soort Patreon constructie, waarmee men mij met Satoshi (een miljoenste bitcoin) kan steunen op de makinggames site.
English version
Recently I invested some money in bitCoins, which seems to have been a bright idea.
The bitCoin has recovered in the last hour from the vicious onslaught by China and has climbed (again) to heights never seen before.
This even though Russia has threatened to also ban the coin.
(I think this stands to reason, as this coin cannot be controlled by any government it will be the totalitarian government that will shun it first)
But what I see is that it will very soon be easier and safer to do micropayments over internet via bitCoin. (Even though there is a lot of bad press about hackers, there is a lot of danger in the exchange, but I think it can be greatly mitigated by recent developments)
So I want to take this chance to announce I will be taking bitcoin as a currency when doing business transactions starting februari 2018.
Because the bitcoin is currently at 4231 euro (it went up a bit in the time I wrote the english version) I can now offer you a complete webgame for only 1 bitCoin. :)
But more down to earth, I'm looking at micropayments for the makinggames site as a kind of Patreon structure.
I found this blog:
https://en.bitcoin.it/wiki/How_to_accept_Bitcoin,_for_small_businesses
And I'm currently working through it :)
Labels:
10-10-2017,
2017,
bitCoin,
octobre,
recent course,
recovered
woensdag 4 oktober 2017
Weighted, parented tag-tree
A unification of the tree model with the bucket model for searching posts
Bucket model means: slap a couple of tags on a blog-post and you can search for it. The post is essentially thrown into a bucket, where you can go fish with tags.
Tree model means: the default folder structure for every computer.
I now propose something in the middle, that would work better with the results of user-generated content.
For any post, we force the user to put it somewhere in the ever expanding tree. A user can also create a new folder.
A tag-weight on a post, will consist of a number of points and a total of points, that has been awarded in relation to this tag/post.
a couple of things will happen when he or she does that:
Bucket model means: slap a couple of tags on a blog-post and you can search for it. The post is essentially thrown into a bucket, where you can go fish with tags.
Tree model means: the default folder structure for every computer.
I now propose something in the middle, that would work better with the results of user-generated content.
For any post, we force the user to put it somewhere in the ever expanding tree. A user can also create a new folder.
A tag-weight on a post, will consist of a number of points and a total of points, that has been awarded in relation to this tag/post.
a couple of things will happen when he or she does that:
- The post will be created, it needs to have a unique name, in the folder.
- A tag will be created (if it doesn't exist) in the tag cloud.
- The tag will be a child of another tag, all the way back to a root-tag.
- The tag will be added with weight one to the post and every parent tag will be added to the post, but the weight of this tag parent tags decreases linearly to 0 for the root.
- Essentially it is given points for the depth of the tree of each tag, the total given points is collected and the weight is those points divided by the total.
This gives us an initial weighted structure. Where weights are stored as points and totals.
Tree management:
- Every user loads the tree only once.
- New additions to the tree will appear to the user, as posts with a suggested placing (tagging)
- The user can either discard the post OR accept the proposed tagging (as most will) OR move the post to a different place. (this will reinforce the weighing by 0.1)
- This place will be permanent for this users copy, but will also result in:
- The weights of tags on the post will be amended with the new tag by this user.
- The weights will be amended all the way back to the root, which will have a weight of 0 or not be a tag..
- The new weights will be the points divided by the new totals.
- The popularity of the post will be measured by the amount of readoptation. (Also a point/total system)
This will give us a system in which every tag is either searchable by term, by tree AND freely moveable for each user. Each user searches only in his own copy of the tree, but the NEW copies are subsequently more weighed and a consensus product.
Also it allows for more intelligent tag searching, because every tag is weighed.
If users loose their copy of the tree, they can always get a copy of the newest tree and prune and modify it.
By using a competition system in the posts and artificially limiting the amount of posts to the top x adpopted ones, the tree prunes itself.
Any deletions from the main tree may also be suggested to the user and the user may then follow by pruning his/her tree (deleting the post). (this will have a smaller impact on liking)
A user can also at any time prune his/her tree and this will have a bigger impact. (it is essentially a full dislike or a point less in the readoptation total of this post.
This technique can be combined with the previously proposed technique (2016) to evolve melodies. It can also be used with the proposed technique to have user-generated sounds compete for space in an evolutionary system. (Beep-o-tron-file-system)
And I totally forgot these posts were supposed to be in Dutch.. Maybe I'll translate it someday, not now..
This technique can be combined with the previously proposed technique (2016) to evolve melodies. It can also be used with the proposed technique to have user-generated sounds compete for space in an evolutionary system. (Beep-o-tron-file-system)
And I totally forgot these posts were supposed to be in Dutch.. Maybe I'll translate it someday, not now..
zondag 16 oktober 2016
Adapting the bounding box of an SVG to scale to content
<!doctype HTML>
<html>
<body>
<div style="width: 50px; height: 50px; padding:0px; background-color: #eee;">
<svg width="100%" height="100%" id="test">
<circle cx="50" cy="1" r="10" stroke="green" stroke-width="4" fill="yellow" />
<circle cx="5" cy="20" r="15" stroke="blue" stroke-width="4" fill="red" />
</svg>
</div>
<script>
var svg=document.getElementById("test");
setViewboxToContent(svg);
function setViewboxToContent(svg)
{
var bb=svg.getBBox();
var w=bb.width;
var h=bb.height;
var l=bb.x;
var t=bb.y;
svg.setAttribute("viewBox", (l-2)+" "+(t-2)+" "+(w+4)+" "+(h+4));
}
</script>
</body>
</html>
The bounding box of the SVG can be anything
Just try and move the circles around..
I give 2 pixels margin for fatter lines, when your circles get real small or close together.
It's not perfect, because line-thickness is not taken into account by SVG.getBBox(). but it's quite good. nonetheless
dinsdag 11 oktober 2016
Evolutie in MuziekEditor
Evolutie is het zich aanpassen van een organisme aan zijn omgeving door het maken van verschillende varianten van zichzelf, waarvan er een aantal sterven en een aantal overleven.
Dit principe vind ik al geruime tijd interessant om te vertalen naar computers en ik heb het met succes toegepast voor Building Dragons in navolging van Theo Janssen.
Maar nu dringt zich een systeem aan mij op, dat bij uitstek geschikt is voor zo'n systeem.
Muziek..
- Een melodielijn zou je kunnen zien als een organisme. Het leeft, vraagt interageert en groeit en verandert.
- De akkoorden waardoor een melodielijn zich beweegt bepalen zijn 'succes'.
- Succes is in dit geval hoe het in het oor ligt.
Door componisten worden akkoorden meestal afgeleid van de melodielijn, maar bij een expert-systeem dat melodielijnen ontwerpt werk je andersom. (Note to self: Ik heb daar nog ergens een boekje over, ligt naast de printer, kon wel eens interessant zijn).
Stel nu, dat we een akkoordprogressie vast stellen, dan zouden we een melodielijn kunnen laten evolueren, waarbij we een gebruiker een aantal varianten laten horen en hieruit laten kiezen in een aantal generaties.
- In principe kan een volgend akkoord in een progressie ook zo worden gezien: als een systeem van pitches, die zo weinig mogelijk van zichzelf veranderen. 9/10 van de muziek zit zo in elkaar.
- Als deze melodielijn dan weer het volgende akkoord bepaalt (eventueel met hetzelfde principe van evolutionair de gebruiker laten kiezen) kan een volslagen leek muziek maken op midi-niveau.
- Andere partijen zoals de bas, maar ook principes als het ritme kunnen ook op deze manier ontstaan en toegepast worden op het hele of een deel van de compositie.
vrijdag 30 september 2016
Point In Polygon Algorithme
Ik heb lang gezocht naar een GOED point in polygon algorithme.
In mijn geval betekent GOED, dat je geen rekening hoeft te houden met winding-rules, dat het snel is en makkelijk in gebruik voor de developer.
Ook moet het ALLEEN point in polygon doen en geen grote berekeningen, dat doe ik daarna wel op eigen houtje.
Nou, daar is hij dan:
In mijn geval betekent GOED, dat je geen rekening hoeft te houden met winding-rules, dat het snel is en makkelijk in gebruik voor de developer.
Ook moet het ALLEEN point in polygon doen en geen grote berekeningen, dat doe ik daarna wel op eigen houtje.
Nou, daar is hij dan:
var point={x:10,y:10};
var plgn=[{x:5,y:5},{x:55,y:5},{x:55,y:55},{x:5,y:55}];
console.log(PointInPolygon(point,plgn));
function PointInPolygon(p,pgn)
{
var i,j,c=false;
for(i=0,j=pgn.length-1;ip.y)!=(pgn[j].y>p.y))&&
(p.x<(pgn[j].x-pgn[i].x)*(p.y-pgn[i].y)/(pgn[j].y-pgn[i].y)+pgn[i].x))
{
c=!c;
}
}
return c;
};
Test het hier: https://jsfiddle.net/uvr9wt5j/
woensdag 9 maart 2016
Illusion with AnimGif encoder Javascript
There have been some implementations lately to create gif89a with the new webworkers.
I didn't get round to it, because I wanted a clean version (with a workaround for older browsers), and frankly because I have been a bit under the weather and had other things to think about.
I didn't get round to it, because I wanted a clean version (with a workaround for older browsers), and frankly because I have been a bit under the weather and had other things to think about.
But yesterday I said to myself I had to get back in the saddle. So this is the first thing I tackled.
I wanted to have a nice application, where you can convert game-footage into animated gifs smoothly. And to test it, I generated this small illusion. Enjoy.
If you stare at the middle a while, things will start growing when you look at them.
Also, I just like the confusion around the stripe.. If you look at a single wind of the spiral, you'll see it appears not actually to be moving to the middle, it jumps back.. The animation seems not to be smooth.
However, when you look at the middle, the spiral seems to be continuously moving inward
and the animation is smooth again..
I wanted to have a nice application, where you can convert game-footage into animated gifs smoothly. And to test it, I generated this small illusion. Enjoy.
If you stare at the middle a while, things will start growing when you look at them.
Also, I just like the confusion around the stripe.. If you look at a single wind of the spiral, you'll see it appears not actually to be moving to the middle, it jumps back.. The animation seems not to be smooth.
However, when you look at the middle, the spiral seems to be continuously moving inward
and the animation is smooth again..
In fact, for a good test, I wanted to render something with a lot of color. (gif89a being a 256 color format) So here is another one, but with changing colors. It makes the illusion less effective, but it's better for testing..
zaterdag 6 februari 2016
Mother of pearl illusion
Ik ben bezig met een aantal nieuwe illusies. Dit is er een van.
Gek genoeg doet hij het niet, als ik hem film, wel als ik hem animeer.
Wie weet waarom?
zondag 17 januari 2016
7 Principles of Programming - 2
Principle 2
After seeing principle 1, most people are astounded how easy programming has become.
It has allready exceeded their expecations of what they are capable of. That is a nice moment to go on to something slightly more complex.
Conditions and expressions.
var b=1;
var a=2;
if(b>0) a=a+1;
This needs a line by line explanation. b=1, a=2, we know those.It has allready exceeded their expecations of what they are capable of. That is a nice moment to go on to something slightly more complex.
Conditions and expressions.
var b=1;
var a=2;
if(b>0) a=a+1;
- See it in action: https://jsfiddle.net/wtgszrj4/6/
the if statement is new. It means: if b is bigger than 0 do whatever comes next.
b>0 (b is bigger than 0)
b>=0 (b is bigger than or equal to zero)
b<0 (b is smaller than 0)
b<=0 (b is smaller than or equal to zero)
b==0 (b is exactly zero)
Stick to integer math and you'll be fine.
The next thing you might want to know is the else statement.
var b=1;
var a=2;
if(b<0) a=a+1;
else a=a-1;
- See it in action: https://jsfiddle.net/wtgszrj4/7/
This is very handy. In a flow chart it is presented as such:
If you are not familiar with flow-charts, never mind. If you are, this might help you 'translate'
It is good to consider how a program reads a program at this point.
It always moves from the top, to the left. When it reaches the end of the line, it will go to the next line.
But...
If it encounters certain statements, like if this behaviour briefly changes. It can jump and the jump back.
In the case we presented only for one instruction.
So what if you want to have a couple of things happen if the statement is true?
You make a block with { and }
Everything inside the block is considered the 'thing' after if and will be executed as a whole before moving on.
var b=1;
var a=2;
if(b>0)
{
a=a+1;
a=a*a+1;
}
else a=a-1;
- See it in action: https://jsfiddle.net/wtgszrj4/8/
Here we see indenting for the first time. There are several schools of thought on this. This is mine.
The idea is, that you find the { on the same indent-height as it's } counterpart. Not everybody agrees this is the 'right' way to do it.
You will also see this:
var b=1;
var a=2;
if(b>0){
a=a+1;
a=a*a+1;
}else a=a-1;
It means exactly the same thing.
Ok, in the same way we might make a block for anything after else.
This is your work. Test it, change it, hit run, see what happens.
Get into the habit of forming a hypothesis and testing every bit of it.
For instance try to predict what:
var b=1;
var a=2;
if(b>0)
a=a+1;
a=a*a+1;
would do and test it.
HOW TO TEST YOURSELF AND YOUR PROGRAM!
Form a idea of what will happen. Make sure you can see it happening by some output or feedback.Always test your hypothesis by changing something from a working example (which you have tested yourself!) and then testing the change.
If it still works, that tells you something, if it doesn't that tells you something too.
Try to think of what both cases will tell you, before you test it.
Don't change a whole bunch of things before testing.
If you find it doesn't work at that point, it will be hard trying to find the problem.
If you change one thing, test and it doesn't work, the problem is ALWAYS with the last thing you changed.
Don't disregard unexpected results. They are a learning oportunity.
If you do this always, you will NEVER be unable to solve a bug, unless it is in some part of the program, that you don't have access to. (In this case, either Javascript or JSFiddle, both are quite stable)
Ok, so we learned about:
-expressions
-conditions
-branching (doing a bit of code in a differnt place before continuing with the flow of the program)
-code blocks
-testing.
This is a lot to take in. If you feel you need a break, take 10 minutes before coming back.
Abonneren op:
Posts (Atom)





























Ledger
Trezor
Digital
KeepKey



